Rebase to origin/<current branch> by default instead of just "origin"
authorKalle Vahlman <kalle.vahlman@movial.com>
Tue, 9 Dec 2008 10:25:43 +0000 (12:25 +0200)
committerKalle Vahlman <kalle.vahlman@movial.com>
Tue, 9 Dec 2008 10:25:43 +0000 (12:25 +0200)
matrix/git.py

index d5f17b6..867da89 100644 (file)
@@ -158,7 +158,9 @@ def branch_create(name, branch, start=None):
 def remote_update(name):
        call(['remote', 'update'], workdir=name)
 
-def rebase(name, refspec='origin'):
+def rebase(name, refspec=None):
+       if not refspec:
+               refspec = 'origin/' + branch_active(name)
        cmd = ['rebase', refspec]
        if call(cmd, workdir=name) != 0:
                raise Error(cmd, name)