{"thread":{"id":"12391","subject":"Anomaly in git log?","startedAt":"2008-03-01T02:35:54Z","lastAt":"2008-03-01T03:05:14Z","messageCount":2,"participants":["Stephen Rothwell","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"70459","messageId":"20080301133554.7a3cbd35.sfr@canb.auug.org.au","threadId":"12391","inReplyTo":null,"subject":"Anomaly in git log?","fromName":"Stephen Rothwell","fromEmail":"sfr@canb.auug.org.au","sentAt":"2008-03-01T02:35:54Z","receivedAt":"2008-03-01T02:35:54Z","isPatch":false,"sender":{"key":"sfr@canb.auug.org.au","avatar":null},"body":"Hi,\n\nI noticed that under some circumstances \"git log <range> -- <file>\" will\nnot show you all the commits in the range that affected that file.  In\nparticular if one of the commits removes the file, previous modifying\ncommits are not shown.\n\nI found this in the current linux-next tree (next-20080229).\n\ngit log stable.. -- arch/avr32/kernel/semaphore.c\n\nwill show the commit that removes this file, but not the commit that\nmodifies it.  So, is this a bug in git log or my understanding?\n\nIf you do \"git log -p stable..\" and search for the file name, you will\nfind the other commit.\n\ngit version 1.5.4.3 from Debian unstable.\n\n-- \nCheers,\nStephen Rothwell                    sfr@canb.auug.org.au\nhttp://www.canb.auug.org.au/~sfr/\n"},{"id":"70460","messageId":"20080301030513.GV8410@spearce.org","threadId":"12391","inReplyTo":"20080301133554.7a3cbd35.sfr@canb.auug.org.au","subject":"Re: Anomaly in git log?","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-03-01T03:05:14Z","receivedAt":"2008-03-01T03:05:14Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Stephen Rothwell <sfr@canb.auug.org.au> wrote:\n> I noticed that under some circumstances \"git log <range> -- <file>\" will\n> not show you all the commits in the range that affected that file.  In\n> particular if one of the commits removes the file, previous modifying\n> commits are not shown.\n> \n> I found this in the current linux-next tree (next-20080229).\n> \n> git log stable.. -- arch/avr32/kernel/semaphore.c\n> \n> will show the commit that removes this file, but not the commit that\n> modifies it.  So, is this a bug in git log or my understanding?\n> \n> If you do \"git log -p stable..\" and search for the file name, you will\n> find the other commit.\n\nI have seen this happen on my own day-job repositories.  What is\nmost likely the case is the path got deleted on one side of a merge,\nbut was modified on the history of the other side.  Since the file\nis deleted in the merge the path limiter prunes the history and\ndoesn't include search down the other side looking for the modify.\n\nTry adding --full-history to your git-log command line.  But even\nwith that there are some cases where git-log prunes an interesting\nside branch when the path limiter is being used.\n\n-- \nShawn.\n"}]}