From: Jakub Narebski <jnareb@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Nicolas Pitre <nico@cam.org>,
Linus Torvalds <torvalds@linux-foundation.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: Sun, 10 Feb 2008 12:17:21 -0800 (PST) [thread overview]
Message-ID: <m3myq8fwdx.fsf@localhost.localdomain> (raw)
In-Reply-To: <alpine.LSU.1.00.0802100130090.11591@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> On Sat, 9 Feb 2008, Nicolas Pitre wrote:
>
> > I, too, have some reservations about adding any kind of generation
> > header to commit objects. First because it can be generated and
> > maintained locally, just like the pack index. But also because its
> > usefulness has not been proven in all possible graph topologies, and
> > adding it to the commit header pretty much deny any further
> > modifications/improvements on it, if for example some other kind of
> > generation notation becomes advantageous to use.
>
> I fully agree.
I think I'd agree, also because without 'generation' (and 'roots')
commit object header being there from beginning it is not clear when
to calculate it: the first few commits with it would be costly.
Besides graft and shallow information is local, and it affect commit
traversal.
I was thinking about pack-index like file, either directly mapping
"sha1 -> generation + roots", or indirectly "sha1 -> offset",
"offset -> generation + roots".
P.S. Would having generation + roots be enough?
gen(rev) = max_i { gen(i) + 1 : i in parents(rev) } || 1
roots(rev) = { rev if rev is a root (parentless) commit
{ union of roots of parents of a commit otherwise
Union in the sense of set sum.
Note that if roots was to be saved in commit header, then it couldn't
be as simple as commit-id for root commits: no self links. It would
have to be empty for root commits, and the "union of roots" would have
to be modified to "union of roots or commit ids for root commits, of
each of parents of a commit".
--
Jakub Narebski
Poland
ShadeHawk on #git
next prev parent reply other threads:[~2008-02-10 20:18 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 [this message]
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
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=m3myq8fwdx.fsf@localhost.localdomain \
--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).