I would like git to version a tar so that for a repository-related functions such as git-diff (and even complex git-merge conflict resolution), the file looks like a directory with included files that are regularly sent to git, except that when checking, you should again get a valid tar archive. Is this somehow achievable?
At first I thought about using smudge / clean filters , but they just let you change the contents of a saved git blob file.
So now I'm thinking about using hooks ( pre-commit and post-checkout , as suggested here , although I would like to have a pre-add filter ...), which would either simply convert between the file and the tar directory structure, or, to properly maintain metadata, directly using git objects (or, as a compromise, use an intermediate directory, but override metadata ). But before I start with this potentially insane job, are there
- the best way to achieve this, or
- an existing solution?
This has a lot to do with. Can git treat zip files as directories and files inside zip as blobs? , although I hope that due to tar files, which are just concatenation of files and metadata without compression, treating them might be easier.
git tar archive
Tobias Kienzler May 3 '16 at 9:47 a.m. 2016-05-03 09:47
source share