Fix for issue 604
Do not switch to master branch in pull() Add --track to git checkout, when checking out a remote branch to track.
This commit is contained in:
parent
fc6ee63fba
commit
566f115a4f
1 changed files with 1 additions and 2 deletions
3
git
3
git
|
@ -148,10 +148,9 @@ def pull(repo, dest, branch):
|
||||||
else:
|
else:
|
||||||
m = re.search( '^\s+%s$' % branch, gbranch_out, flags=re.M ) #see if we've already checked it out
|
m = re.search( '^\s+%s$' % branch, gbranch_out, flags=re.M ) #see if we've already checked it out
|
||||||
if m is None:
|
if m is None:
|
||||||
cmd = "git checkout -b %s origin/%s" % (branch, branch)
|
cmd = "git checkout --track -b %s origin/%s" % (branch, branch)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
(out, err) = switchLocalBranch( branch )
|
|
||||||
cmd = "git pull -u origin"
|
cmd = "git pull -u origin"
|
||||||
|
|
||||||
cmd = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
cmd = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
|
Loading…
Reference in a new issue