{"thread":{"id":"52739","subject":"git log FILE vs git log --follow FILE missing commits","startedAt":"2020-02-02T21:28:06Z","lastAt":"2020-02-02T21:53:25Z","messageCount":3,"participants":["Chris Packham","Kevin Daudt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"391012","messageId":"CAFOYHZAx-MM26AuJmscK=kGgukQ62vkyqAqU49U-5WRaTp4mGQ@mail.gmail.com","threadId":"52739","inReplyTo":null,"subject":"git log FILE vs git log --follow FILE missing commits","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2020-02-02T21:27:52Z","receivedAt":"2020-02-02T21:28:06Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"Hi,\n\nI've just hit a problem where git log doesn't want to tell me about a\ncommit that touches a specific file.\n\nI wanted to point someone at a particular change that I knew was made\nto a file so I fired up 'git log FILE' and to my surprise it wasn't\nlisted. I wondered if I had remembered wrong so went grepping to\nconfirm the change was in the file I thought it was, sure enough it\nwas there.\n\nPoking around a bit I found that git log --follow FILE shows the\nintended commit but git log FILE doesn't (it does show other commits\nthat touch the file, most of which have tags if that's significant).\nThe file hasn't been renamed so I didn't really expect --follow to\nchange any behavior.\n\nThe version of git I'm using is 2.25.0 from\nhttp://ppa.launchpad.net/git-core/ppa/ubuntu bionic main. I also tried\n2.24.1 and 2.23.1 with the same problem.\n\nAny suggestions for tracking this down?\n\nThanks,\nChris\n"},{"id":"391013","messageId":"20200202214243.GA1090206@alpha","threadId":"52739","inReplyTo":"CAFOYHZAx-MM26AuJmscK=kGgukQ62vkyqAqU49U-5WRaTp4mGQ@mail.gmail.com","subject":"Re: git log FILE vs git log --follow FILE missing commits","fromName":"Kevin Daudt","fromEmail":"me@ikke.info","sentAt":"2020-02-02T21:42:43Z","receivedAt":"2020-02-02T21:45:23Z","isPatch":false,"sender":{"key":"me@ikke.info","avatar":"https://avatars.githubusercontent.com/u/135698?v=4"},"body":"On Mon, Feb 03, 2020 at 10:27:52AM +1300, Chris Packham wrote:\n> Hi,\n> \n> I've just hit a problem where git log doesn't want to tell me about a\n> commit that touches a specific file.\n> \n> I wanted to point someone at a particular change that I knew was made\n> to a file so I fired up 'git log FILE' and to my surprise it wasn't\n> listed. I wondered if I had remembered wrong so went grepping to\n> confirm the change was in the file I thought it was, sure enough it\n> was there.\n> \n> Poking around a bit I found that git log --follow FILE shows the\n> intended commit but git log FILE doesn't (it does show other commits\n> that touch the file, most of which have tags if that's significant).\n> The file hasn't been renamed so I didn't really expect --follow to\n> change any behavior.\n> \n> The version of git I'm using is 2.25.0 from\n> http://ppa.launchpad.net/git-core/ppa/ubuntu bionic main. I also tried\n> 2.24.1 and 2.23.1 with the same problem.\n> \n> Any suggestions for tracking this down?\n> \n> Thanks,\n> Chris\n\nHey Chris,\n\nTry `git log --full-history FILE`. When passing a path to `git log` will\nenable history simplification, which might explain why certain commits\nare not shown.\n\nKind regards, Kevin.\n"},{"id":"391014","messageId":"CAFOYHZAyYLdqUwkctL94T4fSPHj+FyMJqnWmkUu_g4=_wQJ9MQ@mail.gmail.com","threadId":"52739","inReplyTo":"20200202214243.GA1090206@alpha","subject":"Re: git log FILE vs git log --follow FILE missing commits","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2020-02-02T21:53:11Z","receivedAt":"2020-02-02T21:53:25Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"On Mon, Feb 3, 2020 at 10:42 AM Kevin Daudt <me@ikke.info> wrote:\n>\n> On Mon, Feb 03, 2020 at 10:27:52AM +1300, Chris Packham wrote:\n> > Hi,\n> >\n> > I've just hit a problem where git log doesn't want to tell me about a\n> > commit that touches a specific file.\n> >\n> > I wanted to point someone at a particular change that I knew was made\n> > to a file so I fired up 'git log FILE' and to my surprise it wasn't\n> > listed. I wondered if I had remembered wrong so went grepping to\n> > confirm the change was in the file I thought it was, sure enough it\n> > was there.\n> >\n> > Poking around a bit I found that git log --follow FILE shows the\n> > intended commit but git log FILE doesn't (it does show other commits\n> > that touch the file, most of which have tags if that's significant).\n> > The file hasn't been renamed so I didn't really expect --follow to\n> > change any behavior.\n> >\n> > The version of git I'm using is 2.25.0 from\n> > http://ppa.launchpad.net/git-core/ppa/ubuntu bionic main. I also tried\n> > 2.24.1 and 2.23.1 with the same problem.\n> >\n> > Any suggestions for tracking this down?\n> >\n> > Thanks,\n> > Chris\n>\n> Hey Chris,\n>\n> Try `git log --full-history FILE`. When passing a path to `git log` will\n> enable history simplification, which might explain why certain commits\n> are not shown.\n>\n> Kind regards, Kevin.\n\nYes that shows the commit in question.\n\nBased on the description of the default mode that actually makes\nsense. The change in question was a removal, but there was a merge of\nanother branch that never contained the code that was removed. So the\nsimplest history involves commits from the branch that never contained\nthe change I was after.\n"}]}