Writes to git package

Hy!

Is there a way to get a list of all the commits stored in the git package, without cloning in the first place?

Getting heads is easy, but I couldn't find a way to get a full way out of it.

+8
git
source share
1 answer

It is impossible without writing specialized software to go through the package included in the kit. If the package was created with negative links, it may include deltas that are not resolvable using only the objects in the package (a package embedded in a bundle may be thin).

Cloning a package (at least for a bare clone) will separate refs links and index the package, creating a format that standard git commands can work with, so this is the easiest way (from an integration point of view) to read it.

One thing you can do to β€œpreview” a package before merging it is to simply add it as a remote repo, and then you can extract it from it and access the tracking links. So something like:

git remote add bundle /path/to/bundle git remote update bundle 

and now you can make gitk master...bundle/master etc. to compare the bundled branches compared to your local repo and finally git pull bundle master to merge it.

Once you're done, just clear git remote rm bundle

+7
source share

All Articles