Skip to content
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

Git plugin should (better) support downloading specific tags or commit hashes #924

Closed
rohlem opened this issue Oct 25, 2021 · 0 comments · Fixed by #925
Closed

Git plugin should (better) support downloading specific tags or commit hashes #924

rohlem opened this issue Oct 25, 2021 · 0 comments · Fixed by #925

Comments

@rohlem
Copy link
Contributor

rohlem commented Oct 25, 2021

From what I can see, the Fetch-Tool plugin for Git features a branch option, but no dedicated way to specify a single tag or commit hash.
Putting a tag name into the branch field actually works for cloning, but on the next execution it checks if git branch has the tag name - which it doesn't, so it always forces re-cloning the repository.

Since the feature of specifying a commit hash is also missing, I would suggest adding an option for this (named commit_hash, or maybe just commit), and re-using this option for tag support.
The check on re-execution could work the same in all cases - compare the current git log hash with the hash from git log (options['commit_hash']).

As specifying both a branch and a commit seems incompatible to me, those options should probably be mutually exclusive.
(The plugin could verify that the commit is a parent of the given branch's current head, but I don't see the use case for that.)

If that sounds good, and I haven't just overlooked the relevant option somehow, I'd try implementing this tomorrow / over the course of the week.

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 a pull request may close this issue.

1 participant