From: Jakub Narebski <jnareb@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Nicolas Pitre <nico@cam.org>, Junio C Hamano <gitster@pobox.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Add "--show-all" revision walker flag for debugging
Date: Mon, 11 Feb 2008 02:24:48 +0100 [thread overview]
Message-ID: <200802110224.48790.jnareb@gmail.com> (raw)
In-Reply-To: <alpine.LFD.1.00.0802101507100.2896@woody.linux-foundation.org>
Linus Torvalds wrote:
> On Sun, 10 Feb 2008, Jakub Narebski wrote:
> >
> > Well, we could always add it as a local (per repository) "cache".
> > With only generation numbers we could use pack-index-like format
> > to store a mapping "commit sha-1 => generation number", just like
> > now pack index stores mapping "object sha-1 => offset in pack".
>
> Yes, and even embedding this in the pack-file (or perhaps, the index, as a
> new index extension) is probably a good idea.
Errr... index is per workarea (per checkout), and this information
is per repository, so IMHO storing this info in an index (dircache)
is a layering violation. Unless you were talking about pack-file-index.
I think that separate file is better idea, this way we can update
generation info lazily: when we went to the root or project whose
all parents have generatrion number, then we save gen numbers to
such "cache" file. If we had to calculate it (even accidentally),
save it.
> > If we want to store also roots, we could either map
> > "commit sha-1 => generation number, roots set offset / id" (constant
> > length value)[*1*], or have gen-*.gen file with generation numbers
> > and roots, and gen-*.idx as index to that file.
>
> The thing is, the roots are almost never actually interesting. Very seldom
> do you have any issue with different commits having different roots. So I
> really don't think it's worth it, considering that it's also much more
> complicated than just adding a sequence number to each commit.
Weren't the cases of multiple roots that were difficult? Storing roots
would help with 'hard' (if seldom happening) cases then.
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2008-02-11 1:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-09 22:02 Add "--show-all" revision walker flag for debugging Linus Torvalds
2008-02-09 23:52 ` Linus Torvalds
2008-02-10 4:44 ` Junio C Hamano
2008-02-10 1:12 ` Johannes Schindelin
2008-02-10 1:22 ` Linus Torvalds
2008-02-10 1:29 ` Johannes Schindelin
2008-02-10 4:09 ` Junio C Hamano
2008-02-10 4:21 ` Junio C Hamano
2008-02-10 1:28 ` Nicolas Pitre
2008-02-10 1:30 ` Johannes Schindelin
2008-02-10 20:17 ` Jakub Narebski
2008-02-10 20:50 ` Linus Torvalds
2008-02-10 21:04 ` Nicolas Pitre
2008-02-10 22:53 ` Jakub Narebski
2008-02-10 23:11 ` Linus Torvalds
2008-02-11 1:24 ` Jakub Narebski [this message]
2008-02-11 1:59 ` Nicolas Pitre
2008-02-11 15:59 ` Linus Torvalds
2008-02-11 16:26 ` Jakub Narebski
2008-02-11 16:39 ` Nicolas Pitre
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=200802110224.48790.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=nico@cam.org \
--cc=torvalds@linux-foundation.org \
/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).