From: Aniket Gupta <aniketgupta3001@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
Sami Jawhar <sami@theorem.dev>, Patrick Steinhardt <ps@pks.im>
Subject: [PATCH 0/2] combine-diff: fix patches for more than 32 parents
Date: Sat, 21 Nov 2026 16:12:32 +0530 [thread overview]
Message-ID: <20261121104234.98386-1-aniketgupta3001@gmail.com> (raw)
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 reply other threads:[~2026-11-21 10:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 10:42 Aniket Gupta [this message]
2026-11-21 10:42 ` [PATCH 1/2] combine-diff: fix the shift for the 33rd parent and later Aniket Gupta
2026-11-21 10:42 ` [PATCH 2/2] combine-diff: do not show a patch for too many parents Aniket Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261121104234.98386-1-aniketgupta3001@gmail.com \
--to=aniketgupta3001@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ps@pks.im \
--cc=sami@theorem.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox