Re: git log --follow doesn't follow a rename over a merge
From: James Blackburn <hidden>
Date: 2016-06-15 22:51:29
On 16 June 2011 19:41, James Blackburn [off-list ref] wrote:
I think 2f1c904 is entirely wrong too -- it's another graft I've done, to a different repo, which isn't to do with DSF, and doesn't contain IBreakpoints.java:
This looks like a bug? man git-log:
[--] <path>...
Show only commits that affect any of the specified paths.
To prevent confusion with options and branch names,
paths may need to be prefixed with "-- " to separate them
from options or refnames.
git log --graph --oneline
* 6530823 six2
* 05512d0 nine
|\
| * 9917e1c seven
| * 76a230e six
| * a6d7961 six
* f7f43f9 four2
* 94392ac eight
|\
| * 5cf0b04 five
| * 5183657 four
* bd329af three
* 57aafee two
* 3d9ecdf one
git log --simplify-merges --oneline -- four
05512d0 nine
94392ac eight
5183657 four
but the merge commit at 'nine' has nothing to do with that path 'four'.
Reproduction steps:
commit() {
echo $1 >>$1 && git add $1 && git commit -m $1
}
git init repo
cd repo
commit one
commit two
commit three
git symbolic-ref HEAD refs/heads/newroot
rm *
git rm --cached *
commit four
commit five
git symbolic-ref HEAD refs/heads/newnewroot
rm *
git rm --cached *
commit six
commit six
commit seven
git checkout master
git merge --no-commit newroot
git mv four four2
commit eight
commit four2
git merge --no-commit newnewroot
git mv six six2
commit nine
commit six2