diff options
| author | Jack Nagel | 2011-11-26 11:33:55 -0600 |
|---|---|---|
| committer | Jack Nagel | 2011-11-26 11:44:55 -0600 |
| commit | e0441fc26a5f90869db2b771f07bab3534e7374e (patch) | |
| tree | ebf7abd1d917df2372ec571752f63b185e8d6a92 /Library | |
| parent | f017f2d2f5225ee4dc0b477b6e5184073ab57455 (diff) | |
| download | brew-e0441fc26a5f90869db2b771f07bab3534e7374e.tar.bz2 | |
Reset to remote HEAD when updating git clones
Git checkouts that do not specify a branch should always reset to the
remote's HEAD, as some remotes have HEAD set to 'unstable' or some other
non-master branch.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index a170459e6..a3996909e 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -366,8 +366,8 @@ class GitDownloadStrategy < AbstractDownloadStrategy else # otherwise the checkout-index won't checkout HEAD # https://github.com/mxcl/homebrew/issues/7124 - # must specify origin/master, otherwise it resets to the current local HEAD - quiet_safe_system "git", "reset", "--hard", "origin/master" + # must specify origin/HEAD, otherwise it resets to the current local HEAD + quiet_safe_system "git", "reset", "--hard", "origin/HEAD" end # http://stackoverflow.com/questions/160608/how-to-do-a-git-export-like-svn-export safe_system 'git', 'checkout-index', '-a', '-f', "--prefix=#{dst}/" |
