projects
/
tools
/
git-buildpackage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70aad7d
)
detect flat tar archives (Closes: #463822)
author
Guido Guenther
<agx@sigxcpu.org>
Fri, 8 Feb 2008 16:08:19 +0000
(17:08 +0100)
committer
Guido Guenther
<agx@sigxcpu.org>
Fri, 8 Feb 2008 16:08:19 +0000
(17:08 +0100)
git-import-orig
patch
|
blob
|
history
diff --git
a/git-import-orig
b/git-import-orig
index f3344bec853683b50fb87b99c048df482c66e2fb..ade8437b19c138a284b5349c5179fcbb667762d2 100755
(executable)
--- a/
git-import-orig
+++ b/
git-import-orig
@@
-169,7
+169,13
@@
on howto create it otherwise use --upstream-branch to specify it.
unpack_orig(archive, tmpdir)
if options.verbose:
print "Unpacked %s to '%s'" % (archive , tmpdir)
- orig_dir = glob.glob(tmpdir+'/*')[0]
+ unpacked = glob.glob(tmpdir+'/*')
+ # archive has everything packed up in one subdir:
+ if len(unpacked) == 1:
+ orig_dir = unpacked[0]
+ # archive content not in a subdir
+ else:
+ orig_dir = tmpdir
try:
if not is_empty: