Question: Convert source tarball to GIT repository
mike at codeweavers.com
Sat Oct 21 09:11:18 CDT 2006
Matthew Kehrer wrote:
> Is there a way I can convert a source tarball I download to a local GIT
Actually, I gave this some thought. It's possible, but complicated.
You can create your own git tree as follows:
tar jxvf wine-0.9.23.tar.bz2 | sed s/^wine-0.9.23\\/// > list
git update-index --add `cat ../list`
git commit -m "Import of wine-0.9.23"
This should result in the message (the SHA-1 ID should match!):
Committing initial tree c8369ac44e507d96073ca57e9a0a1e77f5ec9511
This will give you a git tree with no history. The problem is then to
keep it updated. Searching for that tree id in the Wine Git tree shows:
git rev-list --header HEAD | less
author Alexandre Julliard <julliard at winehq.org> 1160750619 +0200
committer Alexandre Julliard <julliard at winehq.org> 1160750619 +0200
So we can make the SHA1 ID of the *tree* line up, thus we have the same
tree. Given the same tree, we can find a commit ID we should be able to
generate a Git patch mailbox that updates your Git tree inline with the
latest Wine Git, without needing the entire history.
So the initial download would be about 10Mb for the wine source tarball,
then a bunch of patches in git mailbox format for each update.
I'll see if I can setup some scripts to do this more automatically.
More information about the wine-devel