update: fix --rebase

This commit is contained in:
Mike McQuaid 2015-07-09 23:50:55 +01:00
parent 0b740f51ab
commit 151890148c

View File

@ -148,11 +148,12 @@ class Updater
# ensure we don't munge line endings on checkout
safe_system "git", "config", "core.autocrlf", "false"
args = ["pull", "origin"]
args = ["pull"]
args << "--rebase" if ARGV.include? "--rebase"
args += quiet
args << "origin"
# the refspec ensures that 'origin/master' gets updated
args << "refs/heads/master:refs/remotes/origin/master"
args += quiet
reset_on_interrupt { safe_system "git", *args }