Commit ff2febc
committed
rebase -i: respect commit.cleanup when picking fixups
Since f7d42ce (rebase -i: do leave commit message intact in fixup!
chains, 2021-01-28) the sequencer has passed the VERBATIM_MSG flag
when committing the final fixup in a chain. This was added in response
to a bug report[1] where the commit message was being cleaned up when
it should not be. The cause of that bug was that before f7d42ce
the sequencer passed CLEANUP_MSG when committing the final fixup. That
commit should have simply removed the CLEANUP_MSG flag, not changed it
to VERBATIM_MSG. Using VERBATIM_MSG ignores the user's commit.cleanup
config when committing the final fixup which means it behaves
differently to an ordinary "pick" command that respects commit.cleanup.
Fix this by not setting any explicit cleanup flag when committing the
final fixup which matches the way "pick" commands behave. The test
added in f7d42ce is replaced with one that checks that "fixup"
and "pick" commands do not clean up the message when commit.cleanup
is not set and do clean up the message when it is set.
[1] https://lore.kernel.org/git/CANVGpwZGbzYLMeMze64e_OU9p3bjyEgzC5thmNBr6LttBt+YGw@mail.gmail.com/
Signed-off-by: Phillip Wood <[email protected]>1 parent 92c87bd commit ff2febc
2 files changed
+22
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2436 | 2436 | | |
2437 | 2437 | | |
2438 | 2438 | | |
2439 | | - | |
2440 | 2439 | | |
2441 | 2440 | | |
2442 | 2441 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
495 | 511 | | |
496 | 512 | | |
497 | 513 | | |
0 commit comments