download_strategy: ensure fixed commit hash length
The length of the commit hash returned for `--short` can vary depending on user configuration. Make sure this works independently of what might have been configured via a user's `.gitconfig`. This also fixes the failing `GitDownloadStrategyTests#test_last_commit` test for such users.
This commit is contained in:
parent
68bbe6ee5f
commit
32f7e738ec
@ -592,7 +592,7 @@ class GitDownloadStrategy < VCSDownloadStrategy
|
|||||||
end
|
end
|
||||||
|
|
||||||
def last_commit
|
def last_commit
|
||||||
Utils.popen_read("git", "--git-dir", git_dir ,"rev-parse", "--short", "HEAD").chomp
|
Utils.popen_read("git", "--git-dir", git_dir, "rev-parse", "--short=7", "HEAD").chomp
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user