{"thread":{"id":"61256","subject":"[BUG] \"git range-diff\" does not know X^! is a valid range","startedAt":"2024-04-02T17:45:49Z","lastAt":"2024-04-02T20:37:56Z","messageCount":3,"participants":["Junio C Hamano","René Scharfe"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"492093","messageId":"xmqq7chf64l1.fsf@gitster.g","threadId":"61256","inReplyTo":null,"subject":"[BUG] \"git range-diff\" does not know X^! is a valid range","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-04-02T17:45:46Z","receivedAt":"2024-04-02T17:45:49Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"When cherry-picking an existing commit X to a different base, which\nmay have resulted in conflicts that needed a fix-up, you would want\nto be able to compare X~1..X and HEAD~1..HEAD and naturally, we\nwould expect \"range-diff\" to have a handy way to allow giving the\ncommand without having to type the overly long branch name X twice.\n\nIndividual \"diff\" for these two ranges are easy to obtain without\nrepeating X:\n\n    $ git diff X^!\n    $ git diff HEAD^!\n\nThe \"git range-diff\" however does not understand that X^! is a valid\nrange X~1..X.  This command throws an error and ...\n\n    $ git range-diff refs/merge-fix/ew/khash-to-khashl^! HEAD^!\n    fatal: need two commit ranges\n\n... to add insult to injury, it shows the huge \"git range-diff -h\"\noutput after that.\n\nAny takers?\n"},{"id":"492107","messageId":"9b184d3e-412c-4357-83f6-5aad51a8e3d2@web.de","threadId":"61256","inReplyTo":"xmqq7chf64l1.fsf@gitster.g","subject":"Re: [BUG] \"git range-diff\" does not know X^! is a valid range","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2024-04-02T20:24:23Z","receivedAt":"2024-04-02T20:24:30Z","isPatch":false,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Am 02.04.24 um 19:45 schrieb Junio C Hamano:\n> When cherry-picking an existing commit X to a different base, which\n> may have resulted in conflicts that needed a fix-up, you would want\n> to be able to compare X~1..X and HEAD~1..HEAD and naturally, we\n> would expect \"range-diff\" to have a handy way to allow giving the\n> command without having to type the overly long branch name X twice.\n>\n> Individual \"diff\" for these two ranges are easy to obtain without\n> repeating X:\n>\n>     $ git diff X^!\n>     $ git diff HEAD^!\n>\n> The \"git range-diff\" however does not understand that X^! is a valid\n> range X~1..X.  This command throws an error and ...\n>\n>     $ git range-diff refs/merge-fix/ew/khash-to-khashl^! HEAD^!\n>     fatal: need two commit ranges\n\nSeems to work fine in this example:\n\n   $ git range-diff refs/remotes/origin/maint^! HEAD^!\n   -:  ---------- > 1:  c2cbfbd2e2 The thirteenth batch\n\nAre your refs valid?  Does \"git rev-parse\" resolve them properly?\n\nis_range_diff_range() uses setup_revisions(); not sure how it could\nmisparse \"X^!\". :-?\n\n> ... to add insult to injury, it shows the huge \"git range-diff -h\"\n> output after that.\n\nYeah, that's annoying in general, I guess to anyone who has seen it\nbefore or knows that -h or --help will list options.  Drowns out the\nactual signal.\n\nRené\n\n"},{"id":"492111","messageId":"xmqq34s34i1r.fsf@gitster.g","threadId":"61256","inReplyTo":"9b184d3e-412c-4357-83f6-5aad51a8e3d2@web.de","subject":"Re: [BUG] \"git range-diff\" does not know X^! is a valid range","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-04-02T20:37:52Z","receivedAt":"2024-04-02T20:37:56Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"René Scharfe <l.s.r@web.de> writes:\n\n> Seems to work fine in this example:\n>\n>    $ git range-diff refs/remotes/origin/maint^! HEAD^!\n>    -:  ---------- > 1:  c2cbfbd2e2 The thirteenth batch\n>\n> Are your refs valid?  Does \"git rev-parse\" resolve them properly?\n\nAh, HEAD^! was typoed without SHIFT key.  Sorry for the noise.\n"}]}