aboutsummaryrefslogtreecommitdiffhomepage
path: root/git-import-orig
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2007-05-20 02:29:19 +0200
committerGuido Guenther <agx@bogon.sigxcpu.org>2007-05-20 02:29:19 +0200
commitf63599a3fe0924c6545587c0a2450fbd9ee4113b (patch)
treee82ad8ad42fb2c74076860eb96368af65f1bb2a5 /git-import-orig
parent20fddd876cc2621d31dab4c99ea3e27827c79aee (diff)
allow to import an already unpacked source tree
Diffstat (limited to 'git-import-orig')
-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()