summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgit-bz7
1 files changed, 6 insertions, 1 deletions
diff --git a/git-bz b/git-bz
index 7b0fe69..01f37d9 100755
--- a/git-bz
+++ b/git-bz
@@ -245,7 +245,12 @@ def get_commits(commit_or_revision_range):
commits = rev_list_commits(rev, max_count='1')
except CalledProcessError:
# If not, assume the argument is a range
- commits = rev_list_commits(commit_or_revision_range)
+ try:
+ commits = rev_list_commits(commit_or_revision_range)
+ except CalledProcessError:
+ # If not again, the argument must be invalid — perhaps the user has
+ # accidentally specified a bug number but not a revision.
+ commits = []
if len(commits) == 0:
die("'%s' does not name any commits. Use HEAD to specify just the last commit" %