{"thread":{"id":"53718","subject":"Bogus error from git log --full-diff","startedAt":"2020-06-19T15:59:02Z","lastAt":"2020-06-19T17:13:21Z","messageCount":4,"participants":["Andreas Schwab","Konstantin Tokarev","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"400132","messageId":"87h7v7xf1n.fsf@igel.home","threadId":"53718","inReplyTo":null,"subject":"Bogus error from git log --full-diff","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2020-06-19T15:15:32Z","receivedAt":"2020-06-19T15:59:02Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"If you have log.follow=true, then git log --full-diff doesn't work any\nmore, giving a bogus error:\n\n$ ./git -c log.follow=true log --full-diff .\nfatal: --follow requires exactly one pathspec\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1\n\"And now for something completely different.\"\n"},{"id":"400141","messageId":"585541592583234@mail.yandex.ru","threadId":"53718","inReplyTo":"87h7v7xf1n.fsf@igel.home","subject":"Re: Bogus error from git log --full-diff","fromName":"Konstantin Tokarev","fromEmail":"annulen@yandex.ru","sentAt":"2020-06-19T16:14:41Z","receivedAt":"2020-06-19T16:14:51Z","isPatch":false,"sender":{"key":"annulen@yandex.ru","avatar":null},"body":"\n\n19.06.2020, 18:59, \"Andreas Schwab\" <schwab@linux-m68k.org>:\n> If you have log.follow=true, then git log --full-diff doesn't work any\n> more, giving a bogus error:\n>\n> $ ./git -c log.follow=true log --full-diff .\n> fatal: --follow requires exactly one pathspec\n\nI've reported this issue in February on this very list and didn't get any reaction from developers.\nSeems like it's not considered to be a bug.\n\n-- \nRegards,\nKonstantin\n\n"},{"id":"400147","messageId":"xmqqtuz7hthj.fsf@gitster.c.googlers.com","threadId":"53718","inReplyTo":"87h7v7xf1n.fsf@igel.home","subject":"Re: Bogus error from git log --full-diff","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-06-19T17:10:16Z","receivedAt":"2020-06-19T17:10:21Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Schwab <schwab@linux-m68k.org> writes:\n\n> If you have log.follow=true, then git log --full-diff doesn't work any\n> more, giving a bogus error:\n\nDoes \"any more\" mean it used to work with older version of Git, or\nit used to work before log.follow is thrown into the configuration\nfile?\n\n> $ ./git -c log.follow=true log --full-diff .\n> fatal: --follow requires exactly one pathspec\n\nI see one and half possible bogosities in here.\n\n * \"--follow\" is about following a single path, so even without\n   \"--full-diff\", i.e. \"git log --follow .\", should not proceed but\n   notice it as an error.  The pathspec should name a single path,\n   like \"helloworld.py\" (and no, git does not track directories, so\n   \".\"  is not a single path.  The pathspec \".\" matches everything\n   under that directory).\n\n * \"--full-diff\" wants to make a full comparison between two trees\n   (in the case of \"git log\", the child and its parent(s)), but\n   \"--follow\" wants to make a comparison between just two blobs\n   (i.e. the path that it is following in the child, and the\n   \"corresponding\" blob in the parent commit(s)), so they are\n   inherently incompatible.\n\nSince neither is flagged as an error, the \"--follow\" logic is upset\nwhen \"--full-diff\" widens the input of the \"diff\" run internally\n(the error message comes from the fact that full-diff cleared the\npathspec used to generate this diff that the \"--follow\" logic uses\nto find the corresponding path it is following---it sees zero when\nit wants to have one).\n\nI said these are one-and-half, because a reasonable expectation by\nthe end user could be that the configured log.follow is automatically\nturned off when any incompatible option is given from the command\nline, i.e.\n\n    git -c log.follow=yes log --full-diff .\n\nshould be equivalent to\n\n    git log --full-diff .\n\nand not\n\n    git log --full-diff --follow .\n\nAnd with that, we should not see the bogus * 1.5 error message.\n\nSo, I see 3 potential things that can be improved.  Tightened error\nchecking for \"--follow\" itself, tightened error checking for mutual\nexclusivity, and turning configured log.follow off automatically.\n\nThanks.\n\n"},{"id":"400148","messageId":"xmqqmu4zhtcn.fsf@gitster.c.googlers.com","threadId":"53718","inReplyTo":"585541592583234@mail.yandex.ru","subject":"Re: Bogus error from git log --full-diff","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-06-19T17:13:12Z","receivedAt":"2020-06-19T17:13:21Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Konstantin Tokarev <annulen@yandex.ru> writes:\n\n> I've reported this issue in February on this very list and didn't\n> get any reaction from developers.  Seems like it's not considered\n> to be a bug.\n\nPlease do not read too much into lack of response.  It may be caused\nby many things, including (certainly non-exhaustive):\n\n (1) the message may have been un-understandable and/or did not look\n     interesting enough to ask for clarifications and more info to\n     produce a useful response,\n\n (2) the message may have been delivered in a hostile tone that\n     people chose to ignore even though it raised a valid issue, or\n\n (3) the message was simply missed because everybody was busy doing\n     other things.\n\nBy default, everybody should assume the last one.  Re-raising the\nissue after some cooling-off period would be a good strategy.\n\nThanks.\n\n"}]}