-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add providing location for fetch_via_{vcs,git} #54
base: master
Are you sure you want to change the base?
Conversation
Hey, @aalexanderr thanks for your contribution, please can you also add some tests ? @pombredanne please can you chime in :) |
And please consider using black for formatting of code, https://github.com/psf/black |
This allows to call fetch_via_{vcs,git} multiple times for a location to have another revision. Example: fetch_via_git("git+https://github.com/nexB/fetchcode.git", location="/tmp/repo") will checkout tip of default branch fetch_via_git("git+https://github.com/nexB/fetchcode.git@ccb7b6199681910ccf047f1a18aa89ece45d665c", location="/tmp/repo") will reset to ccb7b61 Additionally remove some trailing whitespaces and fix indentation of a docstring. Signed-off-by: Alexander Mazuruk <a.mazuruk@samsung.com>
By using pytest.mark.parametrize decorator. Signed-off-by: Alexander Mazuruk <a.mazuruk@samsung.com>
As recommended by @TG1999 Signed-off-by: Alexander Mazuruk <a.mazuruk@samsung.com>
As recommended by @TG1999 Signed-off-by: Alexander Mazuruk <a.mazuruk@samsung.com>
b5d6614
to
43ba80c
Compare
Hi, glad to contribute! Will also need to handle some cases like: |
@TG1999 do you know if there is a way to get a shallow clone too? |
extends aboutcode-org#54 Signed-off-by: Mateusz Perc <m.perc@samsung.com>
Hi, wanted to update -
I'll add some tests in the near future but as I want it to be able to cover a bit more than is in scope of this PR I'll need a bit more time to work on it (as in mocks, fixtures etc) As for this PR I'll probably split it too:
|
we might add it but it would need to be properly documented as some of the features of shallow clone are not yet done in git |
-extends aboutcode-org#54 -Added filename deduction (content-disposition/URL) -Fetch and its helper functions now use pathlib's Path Signed-off-by: Mateusz Perc <m.perc@samsung.com>
-extends aboutcode-org#54 -Added filename deduction (content-disposition/URL) -Fetch and its helper functions now use pathlib's Path Signed-off-by: Mateusz Perc <m.perc@samsung.com>
-extends aboutcode-org#54 -Added filename deduction (content-disposition/URL) -Fetch and its helper functions now use pathlib's Path Signed-off-by: Mateusz Perc <m.perc@samsung.com>
-extends aboutcode-org#54 -Added filename deduction (content-disposition/URL) -Fetch and its helper functions now use pathlib's Path Signed-off-by: Mateusz Perc <m.perc@samsung.com>
-extends aboutcode-org#54 -Added filename deduction (content-disposition/URL) -Fetch and its helper functions now use pathlib's Path Signed-off-by: Mateusz Perc <m.perc@samsung.com>
regarding shallow clone, this might be better (already implemented in pip's vcs) https://git-scm.com/docs/partial-clone |
-extends aboutcode-org#54 -Added filename deduction (content-disposition/URL) -Fetch and its helper functions now use pathlib's Path Signed-off-by: Mateusz Perc <m.perc@samsung.com>
This allows to call fetch_via_{vcs,git} multiple times for a location to
have another revision.
Example:
will checkout tip of default branch
will reset to ccb7b61
Additionally:
''
->""
or sth other or if those commits should be dropped at all.