Skip to content

fix: remove erroneous -- from git checkout command#42

Open
saschabuehrle wants to merge 1 commit intogotempsh:mainfrom
saschabuehrle:fix/issue-40
Open

fix: remove erroneous -- from git checkout command#42
saschabuehrle wants to merge 1 commit intogotempsh:mainfrom
saschabuehrle:fix/issue-40

Conversation

@saschabuehrle
Copy link

Bug

#40 — Public repository deployments fail with pathspec did not match any file(s) known to git because the git checkout command places the commit SHA after --, which tells git to treat it as a pathspec (file path) instead of a commit reference.

Fix

Remove the -- argument from the git checkout invocation in download_repo.rs. Per the git manual, arguments after -- are interpreted as pathspecs, not as tree-ish references. The commit SHA should be passed directly to git checkout without the -- separator.

Before: git checkout -- <commit_sha>
After: git checkout <commit_sha>

Testing

Verified locally that git checkout <sha> correctly checks out the target commit, whereas git checkout -- <sha> fails with the reported pathspec error when the SHA does not match a filename.

Happy to address any feedback.

Greetings, saschabuehrle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant