From: David Woodhouse <dwmw2@infradead.org>
To: Petr Baudis <pasky@ucw.cz>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Git Mailing List <git@vger.kernel.org>
Subject: Re: kernel.org now has gitweb installed
Date: Thu, 28 Apr 2005 10:23:19 +0100 [thread overview]
Message-ID: <1114680199.12012.363.camel@baythorne.infradead.org> (raw)
In-Reply-To: <1114676955.12012.346.camel@baythorne.infradead.org>
On Thu, 2005-04-28 at 09:29 +0100, David Woodhouse wrote:
> Let us assume that C and A were already in Linus' tree (and on our web
> page) yesterday. Thus, they should be last. The newly-pulled stuff
> should be first -- FEDBCA.
>
> I'd say "depth-first, remote parent first" but that would actually show
> show 'A' (as a parent of D) long before it shows C. Walking of remote
> parents should stop as soon as we hit a commit which was accessible
> through a more local parent, rather than as soon as we hit a commit
> which we've already printed.
Walk the tree once. For each commit, count the number of _children_.
That's not hard -- each new commit you find below HEAD has one child to
start with, then you increment that figure by one each time you find
another path to the same commit.
When printing, you walk the tree depth-first, remote-parent-first. If
you hit a commit with multiple children, decrement its count by one. If
the count is still non-zero, ignore that commit (and its parents) and
continue. If the count _is_ zero, then this is the "most local" path to
the commit in question, so print it and continue to process its
parents...
(Actually I'd probably do it by adding real pointers to the children
instead of using a counter. Operations like convert-cache would be far
better off working that way round, and 'cg comments' is going to need to
do something very similar to convert-cache.)
--
dwmw2
next prev parent reply other threads:[~2005-04-28 9:21 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-28 1:38 kernel.org now has gitweb installed H. Peter Anvin
2005-04-28 4:17 ` Daniel Jacobowitz
2005-04-28 7:35 ` David Woodhouse
2005-04-28 8:10 ` Petr Baudis
2005-04-28 8:29 ` David Woodhouse
2005-04-28 9:23 ` David Woodhouse [this message]
2005-04-28 18:55 ` Linus Torvalds
2005-04-28 21:20 ` David Woodhouse
2005-04-28 21:40 ` Linus Torvalds
2005-04-28 21:47 ` David Woodhouse
2005-04-28 21:50 ` H. Peter Anvin
2005-04-28 21:52 ` H. Peter Anvin
2005-04-28 22:12 ` Linus Torvalds
2005-04-28 22:12 ` David Woodhouse
2005-04-29 2:46 ` Jan Harkes
2005-04-28 21:21 ` Junio C Hamano
2005-04-28 21:23 ` David Woodhouse
2005-04-28 21:44 ` Junio C Hamano
2005-04-28 22:04 ` Linus Torvalds
2005-04-28 22:59 ` Gerhard Schrenk
2005-04-28 21:38 ` David Woodhouse
2005-04-28 21:49 ` Junio C Hamano
2005-04-28 21:44 ` Linus Torvalds
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=1114680199.12012.363.camel@baythorne.infradead.org \
--to=dwmw2@infradead.org \
--cc=git@vger.kernel.org \
--cc=hpa@zytor.com \
--cc=pasky@ucw.cz \
/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).