chiark / gitweb /
Cope when an orig tarball is a tarbomb.
Ie, if it contains other than one single directory toplevel.
Closes:#843422.
Specifically:
* We change the unpack directory to _unpack-tar in unpack, rather
than ../unpack-tar. This means that mktree_in_ud DTRT in that
directory, rather than in its supposed only subdiredctory
* We do write-tree on the whole tarball.
* Then if the tarball had only one subdir in it, we fish the
subtree's tree object out of the git tree object.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>