SHA1 lib
Reported by James Gregory | October 31st, 2008 @ 12:43 PM
Git uses SHA1 to name it's objects, so we need to verify the .Net SHA1 classes are compatible (can't see why they wouldn't be).
We also need to wrap up the way objects are stored, in that the first two chars of the SHA1 are used as the directory name, then the rest is the file name. This needs to be taken into consideration when matching/finding objects.
Comments and changes to this ticket
-
Niek Bruins October 31st, 2008 @ 03:58 PM
I've started working on the last part. Meaning I've started to write a processor for Git pack files. Currently i'm working on implementing v2 of the format. See http://repo.or.cz/w/git.git?a=bl.../technical/pack-format.txt;h=1803e64e465fa4f8f0fe520fc0fd95d0c9def5bd;hb=HEAD for more info.
-
Niek Bruins October 31st, 2008 @ 04:00 PM
Damn, broken link ^^
This is the correct one:
http://repo.or.cz/w/git.git?a=bl.../technical/pack-format.txt
-
James Gregory October 31st, 2008 @ 04:11 PM
I'm a little fuzzy on what packs are used for. I understand they're collections of git objects, and I read somewhere they're used as a more efficient mechanism of transferring files between remote repositories. However, I've also read that they can be used as an archiving mechanism. Am I correct at all? Any idea when these events would occur?
I'm assuming that when looking for an object by it's sha1, we interrogate the objects directory, then interrogate any packs if we haven't found our object.
-
Niek Bruins October 31st, 2008 @ 04:49 PM
I suppose that would be the flow. Packs are generated when initiating a git fetch or push(for efficient data transfer). But doing
git gc
in your repo would collect all your git objects into a pack file. Git deletes all the objects from the first_two_chars/rest_of_sha/ dirs. So after git gc only a pack file remains in objects/pack.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Git core implementation