aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2008-04-11 19:17:26 +0200
committerGuido Guenther <agx@sigxcpu.org>2008-04-11 19:17:26 +0200
commit209369d6b7ae126653c44551529c418814378fb7 (patch)
treec24b18eb0c8a6e922a566a5a753c6cbc954062cf
parent11188c6c6d17c004c461ac31d7de706e462ed0b3 (diff)
don't pass nonexisting branches to pristine-tar
in case of an empty archive the upstream branch does not yet exist, so pass 'master' to pristine-tar instead Closes: #475554
-rwxr-xr-xgit-import-orig3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-import-orig b/git-import-orig
index 0d0d3a6..ad55854 100755
--- a/git-import-orig
+++ b/git-import-orig
@@ -175,7 +175,8 @@ on howto create it otherwise use --upstream-branch to specify it.
import_upstream_tree(repo, orig_dir, version, options.filters, verbose=not is_empty)
if options.pristine_tar:
- gbpc.PristineTar().commit(archive, options.upstream_branch)
+ upstream_branch = [ options.upstream_branch, 'master' ][is_empty]
+ gbpc.PristineTar().commit(archive, upstream_branch)
gbpc.GitTag(options.sign_tags, options.keyid)(build_tag(options.upstream_tag, version),
msg="Upstream version %s" % version)