{"thread":{"id":"62123","subject":"patch-id doesn't recognize 2nd and further commit id since v2.46.1","startedAt":"2024-09-16T17:58:57Z","lastAt":"2024-09-16T17:58:57Z","messageCount":1,"participants":["Paweł Lipski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"502899","messageId":"CAB+6q+Ks1BVE-PAP0sKDKzjMZ4=Lfcv7LfwGrB9GToRTn24oww@mail.gmail.com","threadId":"62123","inReplyTo":null,"subject":"patch-id doesn't recognize 2nd and further commit id since v2.46.1","fromName":"Paweł Lipski","fromEmail":"pawel.p.lipski@gmail.com","sentAt":"2024-09-16T17:58:18Z","receivedAt":"2024-09-16T17:58:57Z","isPatch":false,"sender":{"key":"pawel.p.lipski@gmail.com","avatar":null},"body":"Hi,\n\nLet's consider the following patch (======= are delimiters):\n\n=======\ncommit 8db0161b9bb897d9cbe68bc1ed8ba8f43f39da00\nAuthor: Tester Test <tester@test.com>\nDate:   Mon Aug 20 20:19:19 2018 +0200\n\n    another master commit\n\ndiff --git a/3.txt b/3.txt\nnew file mode 100644\nindex 0000000..e69de29\n\ncommit 4d5917beba89d2e267ea632b7e78958b3736eabe\nAuthor: Tester Test <tester@test.com>\nDate:   Mon Aug 20 20:19:19 2018 +0200\n\n    squashed\n\ndiff --git a/1.txt b/1.txt\nnew file mode 100644\nindex 0000000..e69de29\n=======\n\nIn `git patch-id` v2.46.0, this gives the output of :\n85da93bf95da4433da1ce20a2b822ec3c72a1b92\n8db0161b9bb897d9cbe68bc1ed8ba8f43f39da00\n3a7470bbbca005289ab50c5297a4d7712cad5a81\n4d5917beba89d2e267ea632b7e78958b3736eabe\n\nbut in v2.46.1 (apparently after the commit\na6e9429f728d088999b815c25adbd2f2c115e051 aka `patch-id: tighten code\nto detect the patch header`):\n\n85da93bf95da4433da1ce20a2b822ec3c72a1b92\n8db0161b9bb897d9cbe68bc1ed8ba8f43f39da00\n3a7470bbbca005289ab50c5297a4d7712cad5a81\n0000000000000000000000000000000000000000\n\nSame for 3+ commits in the input: correct patch id but object id set\nto zeros since 2nd commit.\n\nI've discovered the issue via the failing tests of\nhttps://github.com/VirtusLab/git-machete, which relies on `git\npatch-id`.\n\nBest,\n-- \nPaweł Lipski\n"}]}