From: Junio C Hamano <gitster@pobox.com>
To: Thomas Rast <trast@inf.ethz.ch>
Cc: Ramkumar Ramachandra <artagnon@gmail.com>,
Git List <git@vger.kernel.org>,
Avery Pennarun <apenwarr@gmail.com>
Subject: Re: [PATCH] t4202 (log): add failing test for log with subtree
Date: Mon, 22 Apr 2013 09:32:58 -0700 [thread overview]
Message-ID: <7vk3nupltx.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <87wqruk2pj.fsf@linux-k42r.v.cablecom.net> (Thomas Rast's message of "Mon, 22 Apr 2013 17:24:56 +0200")
Thomas Rast <trast@inf.ethz.ch> writes:
> So (I think?) in the above you claim that $USER interprets
>
> git log -- README.md
>
> as
>
> Show me the history of README.md.
>
> But there's no such thing as the history of a file! The command instead
> says
>
> If I filter all history for only changes affecting a path 'README.md'
> in the root of the repository[1], then what does it look like?
Correct. The "design principle" I did not quote from your message
comes from one of the most important messages in the list archive
($gmane/217).
Three issues with "--follow" are:
(1) It uses the given pathname as single pathspec and drill down
the same way without "--follow" until it notices the path
disappears and until then there is no attempt to detect renames
is made. And it only does -M variant of rename detection
(2) The "same way" in (1) includes the merge simplification to cull
side branches if one parent matches the end result. In a
history where the first parent of a merge M, i.e. M^1, did not
have path F, its second parent M^2 had path F, and the merge
result M deposited the contents of M^2:F at M:D/F, then running
"log --follow F" starting from M would notice that the end
result M did not have F in it, which is shared with its first
parent M^1, and culls the side branch M^2. The --full-history
option may let you keep the history leading to M^2, though.
(3) When (1) notices that the path being followed did not exist in
any of the parents (be it a merge or a non-merge) and finds a
different path with a similar looking content, it _switches_
the pathspec to it, but the single pathspec it uses is a global
state and affects traversals of other ancestry paths at the
same time. Because of this, "--follow" will not work correctly
in a history that contains merges. It often _appears_ to work
only by accident.
The first two are relatively minor (the second is not even an
issue).
To solve the last one, you would need to keep track of which path it
is following per traversal path.
next prev parent reply other threads:[~2013-04-22 16:33 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-22 12:08 [PATCH] t4202 (log): add failing test for log with subtree Ramkumar Ramachandra
2013-04-22 12:11 ` Matthieu Moy
2013-04-22 12:17 ` Thomas Rast
2013-04-22 12:37 ` Ramkumar Ramachandra
2013-04-22 12:54 ` Ramkumar Ramachandra
2013-04-22 12:29 ` Ramkumar Ramachandra
2013-04-22 12:36 ` Matthieu Moy
2013-04-22 13:15 ` Thomas Rast
2013-04-22 13:19 ` Thomas Rast
2013-04-22 14:30 ` Ramkumar Ramachandra
2013-04-22 14:57 ` Ramkumar Ramachandra
2013-04-22 15:24 ` Thomas Rast
2013-04-22 15:46 ` Ramkumar Ramachandra
2013-04-22 15:50 ` Ramkumar Ramachandra
2013-04-22 15:54 ` Ramkumar Ramachandra
2013-04-22 17:29 ` Ramkumar Ramachandra
2013-04-22 19:15 ` Thomas Rast
2013-04-22 19:54 ` Ramkumar Ramachandra
2013-04-22 21:00 ` Philip Oakley
2013-04-22 21:08 ` Ramkumar Ramachandra
2013-04-22 21:23 ` Ramkumar Ramachandra
2013-04-22 21:06 ` Matthieu Moy
2013-04-22 21:59 ` Junio C Hamano
2013-04-22 22:52 ` Ramkumar Ramachandra
2013-04-22 22:59 ` Ramkumar Ramachandra
2013-04-22 23:55 ` Junio C Hamano
2013-04-23 7:53 ` Ramkumar Ramachandra
2013-04-23 16:03 ` Junio C Hamano
2013-04-23 16:29 ` Ramkumar Ramachandra
2013-04-22 16:32 ` Junio C Hamano [this message]
2013-04-22 18:00 ` Ramkumar Ramachandra
2013-04-22 18:18 ` Matthieu Moy
2013-04-22 19:09 ` Junio C Hamano
2013-04-22 20:39 ` Ramkumar Ramachandra
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=7vk3nupltx.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=apenwarr@gmail.com \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=trast@inf.ethz.ch \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.