Thread (8 messages) 8 messages, 4 authors, 2023-10-27

Re: using oldest date when squashing commits

From: Johannes Sixt <hidden>
Date: 2023-10-24 21:20:18

Am 24.10.23 um 19:30 schrieb Junio C Hamano:
Phillip Wood [off-list ref] writes:
quoted
"fixup -c/-C" were conceived as a way to reword a commit message at
the same time as optionally fixing up the commit's content.
Yup, it still is a "fix", meaning the identity and the spirit of the
commit being fixed are unchanged.
That's a pitty, because that is not at all what *I* use "fixup -C" for.
To update the commit message, I use "squash" (or occasionally "reword").
I use "fixup -C" after the following events:

1. Commit unfinished changes for whatever reason. Usually the commit
message just says "WIP <topic>" because that's what it is.
2. Make a fixup commit for an earlier commit because doing the fixup now
gets it out of the way, and often delaying it until after the completed
change would cause merge conflicts.
3. Complete the WIP including the commit message.

I would now use "fixup -C" on commit 3, because its metadata reflects
reality more accurately than that of 1. Commit 3 often comes days after 1.

-- Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help