Kentzo / git-archive-all

A python script wrapper for git-archive that archives a git superproject and its submodules, if it has any. Takes into account .gitattributes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tarbomb is created when no prefix is specified

pgraham opened this issue · comments

Step to reproduce:

1. Run the command in the root of a git repository without specifying a prefix
    $ cd /path/to/my-repo
    $ mkdir releases
    $ git-archive-all releases/my-repo-1.0.tar.gz
2. Extract the archive created in step 1
    $ cd releases
    $ tar -xzf my-repo-1.0.tar.gz

Expected result:

A directory named my-repo-1.0 is created at /path/to/my-repo/releases containing the contents of the archive

Actual result:

The contents of the archive are found directly in /path/to/my-repo/releases

The problem is not limited to archives created using the tarfile module.

@pgraham Can you confirm that issue can be considered fixed?

Hi, I confirm that a Tarbomb is no longer created. However, if the name of the archive contains a dot (.), then it and everything after will be dropped from the prefix:

$ git-archive-all myrepo-1.0.tar.gz
$ tar -xzf myrepo-1.0.tar.gz
$ ls
myrepo-1