diff options
author | Guido Günther <agx@sigxcpu.org> | 2018-01-19 18:27:56 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2018-01-19 18:38:28 +0100 |
commit | e1aacbbcb73a12c4eee132f2bbe57a9a6e0e800f (patch) | |
tree | fbd4a0c2f2226612b3c9cba558c74a32e089baca /gbp/scripts/push.py | |
parent | 5e9ab951b69830d265e7daac1471325a532314a9 (diff) |
push: allow to push from detached heads
Diffstat (limited to 'gbp/scripts/push.py')
-rwxr-xr-x | gbp/scripts/push.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gbp/scripts/push.py b/gbp/scripts/push.py index 868b0954..e21a022f 100755 --- a/gbp/scripts/push.py +++ b/gbp/scripts/push.py @@ -132,10 +132,12 @@ def main(argv): try: source = DebianSource(repo.path) - branch = repo.get_branch() + branch = repo.branch if not options.ignore_branch: if branch != options.debian_branch: - gbp.log.err("You are not on branch '%s' but on '%s'" % (options.debian_branch, branch)) + gbp.log.err("You are not on branch '%s' but %s" % + (options.debian_branch, + "on '%s'" % branch if branch else 'in detached HEAD state')) raise GbpError("Use --ignore-branch to ignore or --debian-branch to set the branch name.") if not dest: |