aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2009-11-26 17:22:13 +0100
committerGuido Günther <agx@sigxcpu.org>2009-11-26 17:23:01 +0100
commitecec4d5a2c1bf78e1c78e4f1dc9008907b66b518 (patch)
tree74c25a04d519d7027e67e287210084c3525b8b01
parent06059dfc4972ed641a669a817146af6d49253e48 (diff)
Don't fail if no tracking branch exists.
-rwxr-xr-xgbp-pull5
1 files changed, 4 insertions, 1 deletions
diff --git a/gbp-pull b/gbp-pull
index fa7fbdf3..a12de882 100755
--- a/gbp-pull
+++ b/gbp-pull
@@ -29,13 +29,16 @@ from gbp.git import (GitRepositoryError, GitRepository)
def fast_forward_branch(branch, repo, options):
remote = repo.get_merge_branch(branch)
+ if not remote:
+ print >>sys.stderr, "Warning: no branch tracking '%s' found - skipping." % branch
+ return
fast_forward = repo.is_fast_forward(branch, remote)
if not fast_forward:
if options.force:
print "Non-fast forwarding '%s' due to --force" % branch
fast_forward = True
else:
- print "Skipping non-fast forward of '%s' - use --force" % branch
+ print >>sys.stderr, "Warning: Skipping non-fast forward of '%s' - use --force" % branch
if fast_forward:
repo.set_branch(branch)
GitMerge(remote)()