Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

SHA1 lib

#3

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.

Reported by James Gregory · October 31st, 2008 @ 12:43 PM

State: new
Milestone: none
Assigned to: nobody

Activity

  1. Niek Bruins
    Niek Bruins

    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.

    October 31st, 2008 @ 03:58 PM

  2. Niek Bruins
    Niek Bruins

    Damn, broken link ^^

    This is the correct one:

    http://repo.or.cz/w/git.git?a=bl.../technical/pack-format.txt

    October 31st, 2008 @ 04:00 PM

  3. Niek Bruins
  4. James Gregory
    James Gregory

    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.

    October 31st, 2008 @ 04:11 PM

  5. Niek Bruins
    Niek Bruins

    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.

    October 31st, 2008 @ 04:49 PM

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.