git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] combine-diff: fix patches for more than 32 parents

From
AGAniket Gupta <aniketgupta3001@gmail.com>
Date
Nov 21, 2026, 10:42 UTC
Message-ID
<20261121104234.98386-1-aniketgupta3001@gmail.com>

This series fixes a bug that Sami Jawhar reported [1]: the combined diff of a merge with more than 32 parents puts lines in the wrong columns, and with 64 parents it shows no hunks at all.

Patch 1 is the actual fix. The shift that sets the bit of a parent in the mask of a lost line was an int shift, so the 33rd parent and later got the bit of another parent.

Patch 2 is for merges that are still too big for the masks which is more than 62 parents where long has 64 bits. Instead of printing wrong output, it now prints an error and skips the patch. I made it carry on and not die. Now "git log --cc" will not stop halfway on a big octopus merge. I am happy to change this if people prefer. On Windows, long has 32 bits, so the limit is 30 and the tests for more parents are skipped.

This is based on maint since the bug is old. The test suite passes and CI on my fork is fine on Windows, macOS and Linux.

[1] https://lore.kernel.org/git/CAOJ8FdczW9KxFknceHodV0jmhyEB24OMtqQUmhkP3E2vfsmgag@mail.gmail.com/
Aniket Gupta (2):
  combine-diff: fix the shift for the 33rd parent and later
  combine-diff: do not show a patch for too many parents
 combine-diff.c           | 18 ++++++++++--
 t/t4038-diff-combined.sh | 60 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 76 insertions(+), 2 deletions(-)
-- 
2.54.0 (Apple Git-157)
Next: Aniket Gupta
Message 1 of 3 in “combine-diff: fix patches for more than 32 parents”
  1. 0/2 combine-diff: fix patches for more than 32 parentsAniket Gupta, Nov 21, 2026
  2. 1/2 combine-diff: fix the shift for the 33rd parent and laterAniket Gupta, Nov 21, 2026
  3. 2/2 combine-diff: do not show a patch for too many parentsAniket Gupta, Nov 21, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.