Re: Git log can not show history before rename
flat view
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:46:04
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