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

git log omits deleting merges

From: Ephrim Khong <hidden>
Date: 2016-06-15 22:59:57

Hi, git log seems to omit merge commits that delete a file if --follow 
or --diff-filter=D is given. Below is a testcase. I'm not sure if it is 
desired behaviour for --diff-filter=D, but it's probably not correct 
that --follow _removes_ the merge commit from the log output.

Thanks - Eph

--
git init
touch some_file
git add some_file
git commit -m "initial"
git branch other_branch
echo foo > some_file
git commit -a -m "commit in master"
git checkout other_branch
echo bar > some_file
git commit -a -m "commit in other_branch"

git merge master --no-commit
rm some_file
git rm some_file
git commit -m "merge"

echo "log 1 - no output"
# note that --diff-filter=A and M work as expected
# the merge does not show up for --diff-filter=ACDMRTUXB either
git log --pretty=oneline --diff-filter=D -- some_file

echo "log 2 - merge is missing"
git log --pretty=oneline --follow --all -- some_file

echo "log 3 - complete"
git log --pretty=oneline --all -- some_file
--
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help