Christian Welzel wrote: > Hi there, > > i ran into this problem today. > I modified my repo by filter-branch to set the committer-date > to the author-date, and then ran git gc. Now pristine-tar cannot > export the tar.gz anymore: > > (master)$ pristine-tar -vd checkout typo3-src_4.5.11+dfsg1.orig.tar.gz > pristine-tar: git archive --format=tar > af10f93e31e2a6a809fdf24e34f6c6bf3a71606f | (cd > '/tmp/pristine-tar.aLUBc5aaTJ' && tar x) > fatal: not a tree object > tar: This does not look like a tar archive > tar: Exiting with failure status due to previous errors > pristine-tar: command failed: git archive --format=tar > af10f93e31e2a6a809fdf24e34f6c6bf3a71606f | (cd > '/tmp/pristine-tar.aLUBc5aaTJ' && tar x)
pristine-tar commit writes, to the pristine-tar branch of your repository, a file named `$origtarball.id`. This file contains the git sha1 of the branch you told it to commit, which is the data that pristine-tar checkout relies on to put the tarball back together. By filter-branching your repo, you have changed the sha1 of all the commits in the branches. By running git gc, you nuked the refs that pristine-tar relied on. pristine-tar could store the sha1 of the tree, rather than the sha1 of the commit. That would have avoided your problem, since your filter-branch did not change any trees. It does not avoid the problem when doing a filter-branch generally, since it can and often is used to change trees too. Of course, making this change would do nothing to existing repositories that contain tree sha1's in the id files. You're free to check out the pristine-tar branch of your repo and fix up the `$origtarball.id` to contain the new refs manually.. -- see shy jo
signature.asc
Description: Digital signature