Skip to content
Snippets Groups Projects
Commit 32f7e738 authored by Martin Afanasjew's avatar Martin Afanasjew
Browse files

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.
parent 68bbe6ee
No related branches found
No related tags found
No related merge requests found
......@@ -592,7 +592,7 @@ class GitDownloadStrategy < VCSDownloadStrategy
end
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
private
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment