-
Notifications
You must be signed in to change notification settings - Fork 4
Fix missing fetch #113
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
Fix missing fetch #113
Conversation
Cmd.execute_successfully(clone_cmd) | ||
end | ||
|
||
Dir.chdir(path) do | ||
execute_reset_cmd(project.type, project.tag) | ||
# this should work with tags, branch names and (full-length) hashes | ||
Cmd.execute_successfully("git fetch --depth 1 origin #{tag}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: i haven't actually checked whether this works for tags. the proper syntax is maybe tags/tagname
. will check tomorrow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look at this - I like the idea to use a fetch here. This will make it easier to reuse the clones, even if upstream changes.
Problem was, that git fetch won't create a local ref by default. Creating now a branch from FETCH_HEAD which works with commits and tags.
Fix #106
Ref problems in pmd/pmd#3960