aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xgit-import-orig13
1 files changed, 8 insertions, 5 deletions
diff --git a/git-import-orig b/git-import-orig
index 0a4cbc9d..a7105af6 100755
--- a/git-import-orig
+++ b/git-import-orig
@@ -125,11 +125,14 @@ create it otherwise use --upstream-branch to specify it.
print >>sys.stderr, "Repository has uncommitted changes, commit these first: "
raise GbpError, out
- tmpdir = unpack_orig(archive)
- if options.verbose:
- print "Unpacked orig to %s" % tmpdir
- orig_dir = glob.glob(tmpdir+'/*')[0]
-
+ if os.path.isdir(archive):
+ orig_dir = archive
+ else:
+ tmpdir = unpack_orig(archive)
+ if options.verbose:
+ print "Unpacked orig to %s" % tmpdir
+ orig_dir = glob.glob(tmpdir+'/*')[0]
+
try:
print "Importing %s to upstream branch..." % archive
gitCheckoutUpstream()