diff --git a/git-review b/git-review index ac0d1ed..dc695d4 100755 --- a/git-review +++ b/git-review @@ -499,7 +499,7 @@ def download_review(review, masterbranch, remote): checkout_cmd = "git checkout -b %s FETCH_HEAD" % branch_name (status, output) = run_command_status(checkout_cmd) if status != 0: - if output.endswith("already exists"): + if re.search("already exists\.?", output): print "Branch already exists - reusing" checkout_cmd = "git checkout %s" % branch_name (status, output) = run_command_status(checkout_cmd) diff --git a/git-review.1 b/git-review.1 index f0de17a..4a0b2ee 100644 --- a/git-review.1 +++ b/git-review.1 @@ -38,6 +38,7 @@ Download .Ar change from Gerrit into a local branch. The branch will be named after the patch author and the name of a topic. +If the local branch already exists, it will attempt to update with the latest patchset for this change. .It Fl f , Fl -finish Close down the local branch and switch back to the target branch on successful submission.