{"thread":{"id":"25028","subject":"git log over restricts output when using --follow?","startedAt":"2010-09-08T00:15:42Z","lastAt":"2010-09-09T19:51:59Z","messageCount":2,"participants":["Gregg Leichtman","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"150260","messageId":"4C86D5AE.6030302@verizon.net","threadId":"25028","inReplyTo":null,"subject":"git log over restricts output when using --follow?","fromName":"Gregg Leichtman","fromEmail":"gslaccts@verizon.net","sentAt":"2010-09-08T00:15:42Z","receivedAt":"2010-09-08T00:15:42Z","isPatch":false,"sender":{"key":"gslaccts@verizon.net","avatar":null},"body":"\n\nBefore I post this as a possible defect, I wanted to check here.\n\nOn the following server:\n\n|gsl@aragorn:~/gitTest> uname -a\nLinux aragorn 2.6.31.12-0.2-default #1 SMP 2010-03-16 21:25:39 +0100 i686 i686 i386 GNU/Linux\n\ngsl@aragorn:~/gitTest> cat /etc/SuSE-release\n\nopenSUSE 11.2 (i586)\nVERSION = 11.2\n|\n\nI use the following git:\n\n|gsl@aragorn:~/gitTest> git --version\ngit version 1.7.2.3\n\n|\n\nI get (with a bash alias of |gitnp='git --no-pager'|):\n\n(1)\n\n|gsl@aragorn:~/gitTest> gitnp log --pretty=oneline junk.txt\n500e8791578c5baf7a139d4997841769a995ac6b mod of junk and junk3\n594ceed7a0fb35a860a6e2cb913d5398f09a861f 1st mod junk.txt\ndf271b2ebd5801bd8d827b0630577cad51c40896 initial junk.txt\n|\n\n(2)\n\n|gsl@aragorn:~/gitTest> gitnp log --follow --pretty=oneline junk.txt\n500e8791578c5baf7a139d4997841769a995ac6b mod of junk and junk3\n594ceed7a0fb35a860a6e2cb913d5398f09a861f 1st mod junk.txt\ndf271b2ebd5801bd8d827b0630577cad51c40896 initial junk.txt\n|\n\n(3)\n\n|gsl@aragorn:~/gitTest> gitnp log -2 --follow --pretty=oneline junk.txt\n500e8791578c5baf7a139d4997841769a995ac6b mod of junk and junk3\n|\n\n(4)\n\n|gsl@aragorn:~/gitTest> gitnp log -2 --pretty=oneline junk.txt\n500e8791578c5baf7a139d4997841769a995ac6b mod of junk and junk3\n594ceed7a0fb35a860a6e2cb913d5398f09a861f 1st mod junk.txt\n|\n\nWhy don't I see 2 output lines for item (3) above?\n\n-=> Gregg <=-\n"},{"id":"150406","messageId":"20100909195159.GC1146@sigill.intra.peff.net","threadId":"25028","inReplyTo":"4C86D5AE.6030302@verizon.net","subject":"Re: git log over restricts output when using --follow?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-09-09T19:51:59Z","receivedAt":"2010-09-09T19:51:59Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Sep 07, 2010 at 08:15:42PM -0400, Gregg Leichtman wrote:\n\n> (3)\n> \n> |gsl@aragorn:~/gitTest> gitnp log -2 --follow --pretty=oneline junk.txt\n> 500e8791578c5baf7a139d4997841769a995ac6b mod of junk and junk3\n> |\n> \n> (4)\n> \n> |gsl@aragorn:~/gitTest> gitnp log -2 --pretty=oneline junk.txt\n> 500e8791578c5baf7a139d4997841769a995ac6b mod of junk and junk3\n> 594ceed7a0fb35a860a6e2cb913d5398f09a861f 1st mod junk.txt\n> |\n> \n> Why don't I see 2 output lines for item (3) above?\n\nWithout looking closer into the problem, I would guess that it is\nbecause of the hack-ish way that --follow is implemented. That is,\nmost history pruning and simplification happens outside of the actual\n--follow traversal. So yes, it looks like a defect, but fixing it may\ninvolve rewriting --follow entirely.\n\nBut don't let that discourage you from looking further. :)\n\n-Peff\n"}]}