From: "Scott Chacon" <schacon@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: "git list" <git@vger.kernel.org>
Subject: Re: Git Community Book
Date: Fri, 5 Sep 2008 14:34:34 -0700 [thread overview]
Message-ID: <d411cc4a0809051434g4e92790fsa38d12487630aa9f@mail.gmail.com> (raw)
In-Reply-To: <7vmyimv0qr.fsf@gitster.siamese.dyndns.org>
On Fri, Sep 5, 2008 at 12:41 PM, Junio C Hamano <gitster@pobox.com> wrote:
> "Scott Chacon" <schacon@gmail.com> writes:
>
>> Also, the last section of the book is on some of the plumbing - mostly
>> stuff I've found difficult to pick up with the existing documentation
>> while re-implementing stuff in Ruby. I would really appreciate it if
>> someone could proofread some of these chapters for errors:
>>
>> http://book.git-scm.com/7_the_packfile.html
>
> Nice pictures. You might also want to know that code for reading pack idx
> version 2 was backported to 1.4.4.5 for people who are stuck on 1.4.4
> series for whatever reason.
>
> What is the target audience of this section? If it is written for a mere
> curious type, or if it is written to give "here is the general idea, for
> more details read the source", the level of detail here would be Ok.
>
> If you are writing for people who want to (re)implement something that
> produces these files, you might want to at least say that offset/sha1[]
> table is sorted by sha1[] values (this is to allow binary search of this
> table), and fanout[] table points at the offset/sha1[] table in a specific
> way (so that part of the latter table that covers all hashes that start
> with a given byte can be found to avoid 8 iterations of the binary
> search).
>
> <data> part is just zlib stream for non-delta object types; for the two
> delta object representations, the <data> portion contains something that
> identifies which base object this delta representation depends on, and the
> delta to apply on the base object to resurrect this object. ref-delta
> uses 20-byte hash of the base object at the beginning of <data>, while
> ofs-delta stores an offset within the same packfile to identify the base
> object. In either case, two important constraints a reimplementor must
> adhere to are:
>
> * delta representation must be based on some other object within the same
> packfile;
>
> * the base object must be of the same underlying type (blob, tree, commit
> or tag);
>
>> http://book.git-scm.com/7_raw_git.html
>
> I am guessing this is for Porcelain writers who use plumbing. Please
> don't teach echoing into .git/refs/... but DO teach using update-ref with
> the -m option. We do not want people's random Porcelains flipping the tip
> of branches without leaving trail in reflog for users to use to recover
> from mistakes.
>
I've implemented all of these and Linus's fixes and suggestions.
Thanks for the feedback.
To answer your earlier question, these docs are basically for people
working on bindings/re-implementations in other languages, since there
is no real linked library available yet, as a primer before they dig
into the source, or possibly so they don't have to.
I'm not fantastic at C, so it took me a while in some cases - figuring
out that the size listed in the object header was not the actual size
of the data, but the size of it when expanded, for example, was not
very easy to do. I've been doing a lot of work on re-implementations
in Ruby and ObjC because I can't easily make real bindings, so I
thought I would add things that I could not easily find in the docs
for others that are trying in other languages.
If you want, I could create a patch for any of this stuff to
Documentation/ (that goes for the whole book), but someone will have
to tell me which parts might be useful to add.
Thanks again for taking the time!
Scott
next prev parent reply other threads:[~2008-09-05 21:36 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-05 19:08 Git Community Book Scott Chacon
2008-09-05 19:15 ` Thomas Adam
2008-09-05 20:45 ` Scott Chacon
2008-09-05 19:41 ` Junio C Hamano
2008-09-05 21:34 ` Scott Chacon [this message]
2008-09-05 22:09 ` Felipe Contreras
2008-09-06 6:33 ` Shawn O. Pearce
2008-09-06 18:14 ` Scott Chacon
2008-09-05 20:27 ` Linus Torvalds
2008-09-06 0:48 ` Stephan Beyer
2008-09-06 18:26 ` Christos Τrochalakis
-- strict thread matches above, loose matches on Subject: below --
2008-07-29 16:20 Scott Chacon
2008-07-29 16:28 ` Miklos Vajna
2008-07-29 17:09 ` Petr Baudis
2008-07-29 18:30 ` Scott Chacon
2008-07-29 18:42 ` Junio C Hamano
2008-07-29 19:00 ` Julian Phillips
2008-07-29 19:09 ` Junio C Hamano
2008-07-29 19:34 ` Scott Chacon
2008-07-29 19:57 ` Junio C Hamano
2008-07-30 21:39 ` J. Bruce Fields
2008-07-29 17:43 ` Junio C Hamano
2008-07-29 18:25 ` Junio C Hamano
2008-07-29 19:29 ` Scott Chacon
2008-07-29 19:24 ` Scott Chacon
2008-07-29 22:34 ` Daniel Barkalow
2008-07-29 22:47 ` Junio C Hamano
2008-07-30 13:20 ` Bart Trojanowski
2008-07-30 18:27 ` Junio C Hamano
2008-07-30 13:31 ` Bart Trojanowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d411cc4a0809051434g4e92790fsa38d12487630aa9f@mail.gmail.com \
--to=schacon@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).