diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-04-21 09:01:21 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-04-21 09:07:18 +0200 |
commit | 060408f1fa22192e864df2d5e6e8597ce7585a5c (patch) | |
tree | 13948f4d8f368132e3f025b7081122b34f2c61bd /gbp/scripts/create_remote_repo.py | |
parent | a507ce23d9838affbb0b5e6fa002307ef27c39da (diff) |
create_remote_repo: Don't fail if current repo does not have any branches
Closes: #822089
Diffstat (limited to 'gbp/scripts/create_remote_repo.py')
-rw-r--r-- | gbp/scripts/create_remote_repo.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gbp/scripts/create_remote_repo.py b/gbp/scripts/create_remote_repo.py index f0a818a6..539c18d7 100644 --- a/gbp/scripts/create_remote_repo.py +++ b/gbp/scripts/create_remote_repo.py @@ -353,7 +353,8 @@ def main(argv): if not read_yn(): raise GbpError("Aborted.") - remote_script = build_remote_script(remote, branches[0]) + remote_default = branches[0] if branches else options.debian_branch + remote_script = build_remote_script(remote, remote_default) if options.verbose: print(remote_script) @@ -366,7 +367,8 @@ def main(argv): if proc.returncode: raise GbpError("Error creating remote repository") - push_branches(remote, branches) + if branches: + push_branches(remote, branches) if options.track: setup_branch_tracking(repo, remote, branches) else: |