diff options
| author | Martin Afanasjew | 2016-07-07 02:14:31 +0200 |
|---|---|---|
| committer | Martin Afanasjew | 2016-07-07 02:14:31 +0200 |
| commit | 32f7e738ecfd84e1d8a063f9af332fdc320dfb7d (patch) | |
| tree | a5abfbb077c29f82dde7f6d4e657fe52f867624f /Library | |
| parent | 68bbe6ee5fc723f154d4a2372997d5bd9682a554 (diff) | |
| download | brew-32f7e738ecfd84e1d8a063f9af332fdc320dfb7d.tar.bz2 | |
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.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index cb94fa38a..4cb1a185a 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -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 |
