aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/scripts/buildpackage.py
diff options
context:
space:
mode:
authorJonathan Rubenstein <jrubcop@gmail.com>2020-09-01 22:53:47 -0400
committerGuido Günther <agx@sigxcpu.org>2021-02-08 11:15:20 +0100
commitd50d59070d7545e869ec6a78e7719a5224545fc7 (patch)
tree8b5cecad71df817decd520ae71b6d6029cad9b87 /gbp/scripts/buildpackage.py
parent434d5587280c72308744a1f3bc9bf657bc34f2e7 (diff)
Add info about --git-ignore-branch when not on branch
Closes: #956491
Diffstat (limited to 'gbp/scripts/buildpackage.py')
-rwxr-xr-xgbp/scripts/buildpackage.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gbp/scripts/buildpackage.py b/gbp/scripts/buildpackage.py
index 8c489bfb..74f2c5bf 100755
--- a/gbp/scripts/buildpackage.py
+++ b/gbp/scripts/buildpackage.py
@@ -328,10 +328,11 @@ def check_branch(repo, options):
branch = None
try:
branch = repo.get_branch()
- except GitRepositoryError:
+ except GitRepositoryError as repo_error:
# Not being on any branch is o.k. with --git-ignore-branch
if not options.ignore_branch:
- raise
+ gbp.log.err(repo_error)
+ raise GitRepositoryError("Use --git-ignore-branch to ignore")
ignore = options.ignore_new or options.ignore_branch
if branch != options.debian_branch and not ignore: