From: Junio C Hamano <junkio@cox.net>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH/RFC 2/2] Make path-limiting be incremental when possible.
Date: Thu, 30 Mar 2006 22:45:55 -0800 [thread overview]
Message-ID: <7v3bgzxgbg.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0603302153350.27203@g5.osdl.org> (Linus Torvalds's message of "Thu, 30 Mar 2006 22:05:26 -0800 (PST)")
Linus Torvalds <torvalds@osdl.org> writes:
> Sadly, it seems to react really badly to Junio's new --boundary logic for
> some reason that I haven't quite figured out yet.
There already was a report that --boundary stuff is not quite
right, so what you are seeing might be that the new code exposes
its original breakage even more. I haven't looked into the
breakage of the original version yet either, so I cannot really
say how your change breaks it.
> That reaction is independent of the actual pathname restriction, and seems
> to be related to how the --boundary logic expected
> pop_most_recent_commit() to work. In particular:
>
> ...
> if (commit->object.flags & BOUNDARY) {
> /* this is already uninteresting,
> * so there is no point popping its
> * parents into the list.
> */
>
> that code is magic, and seems to depend on something subtle going on with
> the list, and the incremental thing already popped the parent earlier and
> screwed up whatever magic that the BOUNDARY code depends on.
This was not so magic, but the magic was actually in the code
added to limit_list(). Usually, "newlist" consists interesting
commits, and what are found interesting initially but marked as
uninteresting when a different ancestry chain coming from an
uninteresting head leading to it was later discovered. The
magic code looks at still-interesting commits, and re-injects
its parents that are uninteresting to the list (and I just
spotted a bug there -- it does not check if what is being "re-"
injected are already on the list -- should I check for SEEN flag
there perhaps?), while marking them as boundary. This was done
to make sure that all the open-circle (in gitk) commits are on
the resulting list.
The part of the code you quoted is just a short-cut for not
doing pop_most_recent_commit() -- we used to have
pop_most_recent_commit() there, which pushed the parents of the
commit being processed into the list. Because we are processing
a boundary commit, we know it is uninteresting -- and by
definition, its parents are uninteresting and that is why it
just advances the list without calling pop_most_recent_commit(),
bypassing its side effect to push its parents into the list.
Since the new code has already advanced the list immediately
after the beginning of do {} block, I think you can remove the
entire "if (revs->max_count) {}" block. As the code currently
stands, you are skipping what happens to be next to the boundary
commit on the result list.
> Junio? I think you did some funky special case with BOUNDARY commits, and
> I broke it for you, can you look at the patch and see if you can see it?
> I'd really like to have the incremental path-limiter, because it really
> makes a huge difference in the usability of "git log pathname".
Oh, there is no question about making it streamable in more
cases is a good thing.
next prev parent reply other threads:[~2006-03-31 6:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-31 0:52 [PATCH/RFC 1/2] Move "--parent" parsing into generic revision.c library code Linus Torvalds
2006-03-31 1:05 ` [PATCH/RFC 2/2] Make path-limiting be incremental when possible Linus Torvalds
2006-03-31 6:05 ` Linus Torvalds
2006-03-31 6:45 ` Junio C Hamano [this message]
2006-03-31 19:39 ` Linus Torvalds
2006-03-31 20:35 ` Junio C Hamano
2006-03-31 20:50 ` Linus Torvalds
2006-03-31 6:16 ` Junio C Hamano
2006-03-31 6:42 ` Linus Torvalds
2006-03-31 7:02 ` Junio C Hamano
2006-04-02 0:35 ` Linus Torvalds
2006-04-02 3:11 ` Junio C Hamano
2006-04-02 3:17 ` [PATCH] revision: simplify argument parsing Junio C Hamano
[not found] ` <443063E2.1040904@lsrfire.ath.cx>
2006-04-03 4:22 ` Junio C Hamano
2006-04-02 3:17 ` [PATCH] revision: --max-age alone does not need limit_list() anymore Junio C Hamano
2006-03-31 8:28 ` [PATCH/RFC 2/2] Make path-limiting be incremental when possible Junio C Hamano
2006-03-31 19: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
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=7v3bgzxgbg.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=torvalds@osdl.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.
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).