From: Junio C Hamano <gitster@pobox.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Paul Mackerras <paulus@samba.org>,
Marco Costalba <mcostalba@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 4/2] Fix parent rewriting in --early-output
Date: Tue, 13 Nov 2007 00:24:55 -0800 [thread overview]
Message-ID: <7vabpiv9go.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20071113080125.GB14735@spearce.org> (Shawn O. Pearce's message of "Tue, 13 Nov 2007 03:01:25 -0500")
"Shawn O. Pearce" <spearce@spearce.org> writes:
> Junio C Hamano <gitster@pobox.com> wrote:
>
>> I have to wonder what would happen if a much higher level caller
>> caused the objects to get parsed before coming into the revision
>> walking machinery, e.g. after the command line processing for
>> A...B walked the ancestry chain until their common ancestors are
>> found. So these commits between A and B are parsed, but the
>> revision limiting machinery hasn't done its operation to set
>> TREECHANGE and/or UNINTERESTING in add_parents_to_list() on
>> these commits yet.
>
> That's one of the problems with the way the revision walking
> machinery is built. Its fast, but it can really only be used once.
Yes but not quite. As long as you do not use overlapping set of
flag bits without cleaning, you are almost Ok.
The reason I say "almost" is that I think the true problem with
the first patch by Linus was to load "parsed" bit any semantics
other than "we have read and parsed the data so do not bother
rereading it". If it used another mechanism (e.g. another flag
bit that means "we have done TREECHANGE and stuff"), returning
rewrite_one_ok to punt when seeing an unprocessed node would
have been safe, as it would not have munged the parent list.
The replacement "TREESAME" patch would work much better without
using such an extra bit, because it allows us to directly check
"if we already decided this does not change from the parent",
and the lack of the bit covers both "we haven't processed it"
and "we processed but we do not want to prune" cases, and not
pruning is safe and easily and correctly re-processible in the
post clean-up phase of the early_output series.
But in general, you're right. An operation that changes the
ancestry shape is irreversible, and you would need to cause
reparsing of the commit objects after you are done with revision
traversal, and at that point, discarding and re-reading
everything from scratch, although is heavy-handed, is one
plausible approach to tackle the problem.
next prev parent reply other threads:[~2007-11-13 8:25 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-28 1:39 New features in gitk Paul Mackerras
2007-10-28 5:34 ` Linus Torvalds
2007-10-28 7:11 ` Paul Mackerras
2007-10-28 7:36 ` Steffen Prohaska
2007-10-28 16:50 ` Linus Torvalds
2007-11-01 10:00 ` Paul Mackerras
2007-11-01 15:16 ` Linus Torvalds
2007-11-02 10:19 ` Paul Mackerras
2007-11-02 12:44 ` Marco Costalba
2007-11-02 15:42 ` Linus Torvalds
2007-11-02 16:50 ` Marco Costalba
2007-11-02 18:16 ` Linus Torvalds
2007-11-02 20:31 ` [PATCH 0/2] History replay support Linus Torvalds
2007-11-02 20:32 ` [PATCH 1/2] Simplify topo-sort logic Linus Torvalds
2007-11-02 20:35 ` [PATCH 2/2] Support "history replay" for git log commands Linus Torvalds
2007-11-02 21:05 ` Junio C Hamano
2007-11-02 21:17 ` Linus Torvalds
2007-11-03 1:40 ` [PATCH 0/2] History replay support Linus Torvalds
2007-11-03 7:56 ` Marco Costalba
2007-11-03 18:11 ` [REPLACEMENT PATCH 2/2] Add "--early-output" log flag for interactive GUI use Linus Torvalds
2007-11-03 19:52 ` Marco Costalba
2007-11-04 3:06 ` Paul Mackerras
2007-11-04 5:38 ` Linus Torvalds
2007-11-04 7:10 ` Paul Mackerras
2007-11-04 7:52 ` Marco Costalba
2007-11-04 18:11 ` Linus Torvalds
2007-11-04 20:12 ` [PATCH 3/2] Enhance --early-output format Linus Torvalds
2007-11-05 20:24 ` Junio C Hamano
2007-11-05 20:47 ` Linus Torvalds
2007-11-05 21:22 ` Linus Torvalds
2007-11-05 21:35 ` Linus Torvalds
2007-11-13 4:58 ` [PATCH 4/2] Fix parent rewriting in --early-output Linus Torvalds
2007-11-13 5:43 ` Junio C Hamano
2007-11-13 6:46 ` Linus Torvalds
2007-11-13 7:16 ` Linus Torvalds
2007-11-13 7:53 ` Sven Verdoolaege
2007-11-13 8:48 ` Junio C Hamano
2007-11-13 8:01 ` Shawn O. Pearce
2007-11-13 8:24 ` Junio C Hamano [this message]
2007-11-13 9:59 ` Paul Mackerras
2007-11-13 18:53 ` Junio C Hamano
2007-11-13 21:55 ` Paul Mackerras
2007-11-16 7:30 ` Marco Costalba
2007-11-04 0:32 ` [PATCH 0/2] History replay support Paul Mackerras
2007-11-02 18:17 ` New features in gitk Johannes Schindelin
2007-11-02 15:03 ` Linus Torvalds
2007-11-01 11:37 ` Paul Mackerras
2007-11-01 15:47 ` Linus Torvalds
2007-11-01 16:21 ` Linus Torvalds
2007-10-28 18:32 ` Pierre Habouzit
2007-10-28 18:38 ` Mike Hommey
2007-10-28 23:13 ` Paul Mackerras
2007-10-29 6:20 ` Pierre Habouzit
2007-10-29 8:31 ` Jonathan del Strother
2007-10-29 6:24 ` Pierre Habouzit
2007-10-29 13:30 ` Han-Wen Nienhuys
2007-10-29 14:04 ` Michele Ballabio
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=7vabpiv9go.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mcostalba@gmail.com \
--cc=paulus@samba.org \
--cc=spearce@spearce.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).