combine-diff: fix patches for more than 32 parents
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | combine-diff: fix the shift for the 33rd parent and latercombine-diff.c t/ | +25 | 0 replies | |
| 2/2 | combine-diff: do not show a patch for too many parentscombine-diff.c t/ | +51 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] combine-diff: fix patches for more than 32 parents
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(-)
Signature · 1 line
2.54.0 (Apple Git-157)