Re: Low-level repository inspection (Re: Where do I stick development documentation?)
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Aug 12, 2010, 03:57 UTC
- Message-ID
- <20100812035733.GA19676@burratino>
- In-Reply-To
- <AANLkTikpT=PD0Q8d=6=989N6rxYXH-Le3Go_szAz-t4s@mail.gmail.com>
Ævar Arnfjörð Bjarmason wrote:
Show 6 quoted lines
> Those are part of the way there, but you often have to tease info out > of them, e.g. if you want a commit -> commit roundtrip: > > $ echo 7980e417 | git cat-file --batch | perl -0777 -pe 's/.* > commit ([0-9]*).(.*)\n/commit $1\0$2/s'|sha1sum > 7980e41746bc5de91eea775f9142ce44b1100361 -
hash-object -w (and other “manipulation commands”)?
Show 5 quoted lines
> It'd be nice to answer "how are object stored" with something like: > > $ echo 7980e417 | git some-thing --pretty=raw - > commit <SP> 525 <NULL> > tree ....
Part of the reason I mention these interfaces is that if people use them (or something like them --- e.g., JGit) then it becomes a lot easier for low-level details of git to evolve.
That is part of why git uses zlib instead of gzip for its loose objects, if I remember correctly.