From: Kevin Bracey <kevin@bracey.fi>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: breakage in revision traversal with pathspec
Date: Wed, 11 Sep 2013 22:39:15 +0300 [thread overview]
Message-ID: <5230C6E3.3080406@bracey.fi> (raw)
In-Reply-To: <20130911182444.GD4326@google.com>
On 11/09/2013 21:24, Jonathan Nieder wrote:
> Kevin Bracey wrote:
>
>> On reflection I'm not sure what we should for the "simple history"
>> view of v1.8.3.1..v1.8.4. We're not rewriting parents, so we don't
>> get a chance to reconsider the merge as being zero-parent, and we do
>> have this little section of graph to traverse at the bottom:
>>
>> 1.8.3
>> o----x----x----x----x---x--- (x = included, o = excluded, *=!treesame)
>> /
>> /*
>> o--x--x--x--x
> [...]
>> 1) if identical to any on-graph parent, follow that one, and rewrite
>> the merge as a non-merge. We currently do not follow to an identical
>> off-graph parent. This long-standing comment in try_to_simplify_commit
>> applies: "Even if a merge with an uninteresting side branch brought
>> the entire change we are interested in, we do not want to lose the
>> other branches of this merge, so we just keep going."
>>
> [...]
>> I currently feel instinctively more disposed to dropping the older
>> "don't follow off-graph identical parents" rule. Let the default
>> history go straight to v1.8.3 even though it goes off the graph,
>> stopping us traversing the topic branch.
> Thanks for this analysis. Interesting.
>
> The rule (1) comes from v1.3.0-rc1~13^2~6: ...
>
> I think you're right that dropping the "don't follow off-graph
> treesame parents" rule would be a sensible change. The usual point of
> the "follow the treesame parent" rule is to avoid drawing undue
> attention to merges of ancient history where some of the parents are
> side-branches with an old version of the files being tracked and did
> not actually change those files. That rationale applies just as much
> for a merge on top of an UNINTERESTING rev as any other merge.
I agree about the rationale still applying - why not follow off-graph,
unless you're doing --ancestry-path? (Fortunately ancestry_path already
disables simplify_history). That makes more sense if you try to ignore
the misleading comment. In a typical "v1..v3" range, the temporal
limiting means that it's paths to the mainline that will tend to be
marked UNINTERESTING, not to the topic branches...
But I can imagine going off graph it may previously have tripped up
other parts of the code. It could be that this Git 1.3.0 rule ended up
covering over some of the older merge hiding logic flakiness. Maybe it's
no longer necessary. I'll do some experiments.
Now, one bit of news - I have just figured out why gitk is behaving
differently. It transforms ".." before it reaches git.
To see the effect at the command line: "git log v1.8.3..v.1.8.4" hides
the merge, but "git log ^v1.8.3 v1.8.4" shows it. Whoops. A new example
of a dotty shorthand not being exactly equivalent.
In the ".." case the v1.8.3 tag gets peeled before being sent to
add_rev_cmdline , and the "mark bottom commits" logic works. But in the
"^" case, the v1.8.3 doesn't get peeled. Junio - any thoughts on the
correct place to fix that? (And gitk actually does ^<tag-sha>, just to
be odd, so that needs to be handled too). Should these things be peeled
in revs->cmdline or not? We should be consistent.
Kevin
next prev parent reply other threads:[~2013-09-11 19:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-10 17:19 breakage in revision traversal with pathspec Junio C Hamano
2013-09-10 21:27 ` Kevin Bracey
2013-09-10 22:23 ` Junio C Hamano
2013-09-11 17:49 ` Kevin Bracey
2013-09-11 18:24 ` Jonathan Nieder
2013-09-11 19:21 ` Junio C Hamano
2013-09-11 19:39 ` Kevin Bracey [this message]
2013-09-11 21:15 ` Junio C Hamano
2013-09-19 21:35 ` Junio C Hamano
2013-09-20 3:35 ` Jeff King
2013-09-20 4:58 ` Junio C Hamano
2013-09-20 5:11 ` Jeff King
2013-09-20 17:51 ` Junio C Hamano
2013-09-25 9:12 ` Jeff King
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=5230C6E3.3080406@bracey.fi \
--to=kevin@bracey.fi \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
/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).