{"thread":{"id":"25128","subject":"Bug: git log --follow doesn't show history for a file created while merge","startedAt":"2010-09-17T12:13:44Z","lastAt":"2010-09-17T12:13:44Z","messageCount":1,"participants":["Kirill Likhodedov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"150874","messageId":"E68F7D53-50A6-4FD3-B176-600942B8A66C@jetbrains.com","threadId":"25128","inReplyTo":null,"subject":"Bug: git log --follow doesn't show history for a file created while merge","fromName":"Kirill Likhodedov","fromEmail":"kirill.likhodedov@jetbrains.com","sentAt":"2010-09-17T12:13:44Z","receivedAt":"2010-09-17T12:13:44Z","isPatch":false,"sender":{"key":"kirill.likhodedov@jetbrains.com","avatar":"https://gravatar.com/avatar/9fd55d2a110e8e96deb3ed7b503d7f3b9b5b1ed5ca9ef6683c15525b11b94e63?d=mp&s=160"},"body":"\nWhen a file is created during a conflicting merge merge and then committed, 'git log --follow' shows no history, while 'git log' behaves correctly.\n\nSteps to reproduce:\n1. Make a conflicting merge.\n2. While manually resolving the merge, create a file.\n3. Commit the new file together with the merge resolve.\n\nMore precisely (trivial outputs are skipped):\n# git init\n# echo 'initial content' > a.txt\n# git add .\n# git commit -m \"initial\"\n\n# git checkout -b mybranch\nSwitched to a new branch 'mybranch'\n# echo 'branchy' > a.txt\n# git add . \n# git commit -m \"branchy to a\"\n\n# git checkout master\n# echo 'mastery' > a.txt \n# git add . \n# git commit -m \"mastery to a\"\n\n# git merge mybranch\nAuto-merging a.txt\nCONFLICT (content): Merge conflict in a.txt\nAutomatic merge failed; fix conflicts and then commit the result.\n# echo 'content' > b.txt\n# git add .\n# git commit -m \"resolved merge for a.txt, added b.txt\"\n\n# git log b.txt \ncommit 1bf7b74c8e53ed065dd615771a602de803f87b6f\nMerge: 7b9b988 a82daa2\nAuthor: Kirill Likhodedov <kirill.likhodedov@jetbrains.com>\nDate:   Fri Sep 17 16:01:24 2010 +0400\n\n    resolved merge for a.txt, added b.txt\n# git log --follow b.txt \n#\n\nI know that Linus doesn't like following renames :) but in this case there are no renames at all. It seems to be just a bug in --follow.\n\nBtw, after additional commits to b.txt, the history gets not empty, but the merge commit is still not listed there. \n\nThanks.\n\n----------------------------------\nKirill Likhodedov\nJetBrains, Inc\nhttp://www.jetbrains.com\n\"Develop with pleasure!\"\n"}]}