git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Thomas Rast <trast@student.ethz.ch>
Subject: Re: Low-level repository inspection (Re: Where do I stick development documentation?)
Date: Wed, 11 Aug 2010 22:57:33 -0500	[thread overview]
Message-ID: <20100812035733.GA19676@burratino> (raw)
In-Reply-To: <AANLkTikpT=PD0Q8d=6=989N6rxYXH-Le3Go_szAz-t4s@mail.gmail.com>

Ævar Arnfjörð Bjarmason wrote:

> 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”)?

> 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.

  reply	other threads:[~2010-08-12  3:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11 22:49 Where do I stick development documentation? Ævar Arnfjörð Bjarmason
2010-08-12  2:39 ` Jonathan Nieder
2010-08-12  3:11   ` Ævar Arnfjörð Bjarmason
2010-08-12  3:17     ` Low-level repository inspection (Re: Where do I stick development documentation?) Jonathan Nieder
2010-08-12  3:40       ` Ævar Arnfjörð Bjarmason
2010-08-12  3:57         ` Jonathan Nieder [this message]
2010-08-12 20:00     ` Where do I stick development documentation? Michael Witten
2010-08-12 20:08       ` Ævar Arnfjörð Bjarmason
2010-08-12 20:29         ` Jonathan Nieder
2010-08-12 20:33     ` Jonathan Nieder
2010-08-12 20:37       ` Ævar Arnfjörð Bjarmason

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100812035733.GA19676@burratino \
    --to=jrnieder@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=trast@student.ethz.ch \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).