git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>, git@vger.kernel.org
Subject: Re: full kernel history, in patchset format
Date: Sat, 16 Apr 2005 11:44:34 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0504161135480.7211@ppc970.osdl.org> (raw)
In-Reply-To: <1113679421.28612.16.camel@tglx.tec.linutronix.de>



On Sat, 16 Apr 2005, Thomas Gleixner wrote:
> 
> One remark on the tree blob storage format. 
> The binary storage of the sha1sum of the refered object is a PITA for
> scripting. 
> Converting the ASCII -> binary for the sha1sum comparision should not
> take much longer than the binary -> ASCII conversion for the file
> reference. Can this be changed ?

I'd really rather not. Why don't you just use "ls-tree" for scripting? 
That's why it exists in the first place. 

It might make sense to have some simple selection capabilities built into 
ls-tree (ie "ls-tree --match drivers/char/ -z <treesha1>" to get just a 
subtree out), but that depends entirely on how you end up using it.

The fact is, there should _never_ any reason to look at the objects
themselves directly. "cat-file" is a debugging aid, it shouldn't be
scripted (with the possible exception of "cat-file blob xxxx" to just
extract the blob contents, since that object doesn't have any internal
structure).

That level of abstraction ("we never look directly at the objects") is 
what allows us to change the object structure later. For example, we 
already changed the "commit" date thing once, and the tree object has 
obviously evolved a bit, and if we ever change the hash, the objects will 
change too, but if you always just script them using nice helper tools, 
you won't ever need to _care_. And that's how it should be.

If there's a tool missing, holler. THAT is the part I've been trying to
write: all the plumbing so that you _can_ script the thing sanely, and not
worry about how objects are created and worked with. 

For example, that "index" file format likely _will_ change. I ended up
doing the new "stage" flags in a way that kept the index file compatible
with old ones, but I did that mainly because it also happened to be the
easiest way to enforce the rule I wanted to enforce (ie the "stage" really
_is_ a part of the filename from a "compare filenames" standpoint, in
order to make sure that the stages are always ordered).

So if the index file change hadn't had that property, I'd have just said
"I'll change the format", and anybody who tried to parse the index file
would have been _broken_.

		Linus

  parent reply	other threads:[~2005-04-16 18:39 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-16 13:15 full kernel history, in patchset format Ingo Molnar
2005-04-16 13:35 ` Ingo Molnar
2005-04-16 14:55   ` David Mansfield
2005-04-16 19:18     ` Ingo Molnar
2005-04-16 15:08 ` Francois Romieu
2005-04-16 17:04 ` Linus Torvalds
2005-04-16 17:43   ` Petr Baudis
2005-04-16 15:44     ` Christopher Li
2005-04-16 18:31   ` Junio C Hamano
2005-04-16 18:35     ` Mike Taht
2005-04-16 19:19       ` Junio C Hamano
2005-04-16 16:26         ` Christopher Li
2005-04-16 19:44           ` Junio C Hamano
2005-04-16 19:42         ` Mike Taht
2005-04-16 20:19           ` Daniel Barkalow
2005-04-16 18:46     ` Junio C Hamano
2005-04-16 19:13   ` Jan-Benedict Glaw
2005-04-16 19:23   ` Thomas Gleixner
2005-04-16 18:32     ` Petr Baudis
2005-04-16 18:36       ` Petr Baudis
2005-04-16 19:41       ` Thomas Gleixner
2005-04-16 18:44     ` Linus Torvalds [this message]
2005-04-16 19:50       ` Thomas Gleixner
2005-04-16 18:57         ` Petr Baudis
2005-04-16 19:27           ` Junio C Hamano
2005-04-16 19:15         ` Linus Torvalds
2005-04-16 20:35           ` Thomas Gleixner
2005-04-16 23:08     ` David Lang
2005-04-16 19:41   ` Ingo Molnar
2005-04-17 23:31   ` David Woodhouse
2005-04-17 23:39     ` Petr Baudis
2005-04-18  0:06       ` David Woodhouse
2005-04-18  0:35         ` Petr Baudis
2005-04-18  0:45           ` David Woodhouse
2005-04-18  0:50             ` Petr Baudis
2005-04-18  0:51               ` David Woodhouse
2005-04-18  0:59                 ` Petr Baudis
2005-04-18  1:16           ` Linus Torvalds
2005-04-18  1:36             ` David Woodhouse
2005-04-18 10:07 ` Catalin Marinas
2005-04-18 22:41   ` David Mansfield
2005-04-19  8:33     ` Catalin Marinas

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=Pine.LNX.4.58.0504161135480.7211@ppc970.osdl.org \
    --to=torvalds@osdl.org \
    --cc=git@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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).