From: Linus Torvalds <torvalds@linux-foundation.org>
To: Frank Li <lznuaa@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Git log can not show history before rename
Date: Fri, 30 Jan 2009 09:17:00 -0800 (PST) [thread overview]
Message-ID: <alpine.LFD.2.00.0901300910580.3150@localhost.localdomain> (raw)
In-Reply-To: <1976ea660901300429i6d9b3594m91222314c284d184@mail.gmail.com>
On Fri, 30 Jan 2009, Frank Li wrote:
>
> Does it conflict with --parents?
Yes. --follow and --parents do not play well together.
That's simply because --follow is a total hack, meant to just satisfy
ex-SVN users who never knew anything about things like parenthood or nice
revision graphs anyway.
It's not totally fundamental, but the current implementation of "--follow"
is really a quick preprocessing thing bolted onto the revision walking
logic, rather than beign anything really integral.
If you want --follow to really work together with --parents (and to do the
right thing wrt merges etc - different renames coming in through different
branches), you'd really have to rewrite the whole --follow logic.
One approach is to use --follow as the quick hack it is - and then when
you see "oh, file X was renamed from file Y", and you want to see the nice
full history, you go back to the native git model (which is not --follow),
which is based on pathname pattherns, and then do
gitk -- X Y
to see the history of _both_ names, and now the rename will show up
properly (and now you'll get proper parenthood because you're no longer
using the hackish --follow thing).
If somebody wants to do a more intelligent --follow, I can only applaud,
but I'm personally not likely to look into it.
Linus
next prev parent reply other threads:[~2009-01-30 17:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-30 11:23 Git log can not show history before rename Frank Li
2009-01-30 11:29 ` Santi Béjar
2009-01-30 12:25 ` Jakub Narebski
2009-01-30 12:29 ` Frank Li
2009-01-30 12:49 ` Santi Béjar
2009-01-30 21:52 ` Thomas Rast
2009-01-31 7:04 ` Jeff King
2009-01-30 17:17 ` Linus Torvalds [this message]
2009-01-30 17:23 ` 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=alpine.LFD.2.00.0901300910580.3150@localhost.localdomain \
--to=torvalds@linux-foundation.org \
--cc=git@vger.kernel.org \
--cc=lznuaa@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