Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: What should a user expect from git log -M -- file

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:47:46

Mike Hommey [off-list ref] writes:
I recently reorganized a project of mine, and the result is that a lot of
files moved from the top directory to a sub directory.

Now, I innocently tried to 'git log -M' some of these files in the
subdirectories, and well, the history just stops when the file was
created. Obviously, if I put both the old and the new location it works,
but shouldn't users expect 'git log -M -- file' to try to find the
previous path and continue from there ?
What you want is not

  git log -M -- file

but

  git log --follow file

"git log -M -- file" IIRC first applies path limiting, simplifying
history, *then* does rename detection, and finally filters output
(unless --full-diff is used).

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help