Thread (14 messages) 14 messages, 4 authors, 2023-10-30

Re: [RESEND v2] git-rebase.txt: rewrite docu for fixup/squash (again)

From: Phillip Wood <hidden>
Date: 2023-10-24 09:22:21

Hi Oswald

On 23/10/2023 18:52, Oswald Buddenhagen wrote:
On Mon, Oct 23, 2023 at 05:01:02PM +0100, Phillip Wood wrote:
quoted
On 23/10/2023 14:00, Oswald Buddenhagen wrote:
quoted
+unless "fixup -c" is used. In the latter case, the message is obtained
+only from the "fixup -c" commit (having more than one of these is
+incorrect).
This change is incorrect - it is perfectly fine to have more than one 
"fixup -c" command. In that case we use the message of the commit of 
the final "fixup -c" command.
i know that this is the case, see the previous thread (which i failed to 
link by header, cf. 
https://lore.kernel.org/all/20231020092707.917514-1-oswald.buddenhagen@gmx.de/T/#u (local) ).
Ah, I see Marc has already raised this point.
quoted
One case where there can be multiple "fixup -c" commands is  when a 
commit has been reworded several times via "git commit 
--fixup=reword:<commit>" and the user runs "git rebase --autosquash"
a cleaner solution would be recognizing the situation and not generating 
these contradicting commands in the first place. of course that would be 
more complexity, but it would also allow catching accidental use.

of course i can go back to documenting the status quo, but it seems kind 
of wrong.
I agree there is an argument for improving the implementation of 
--autosquash but until we do I think it is counterproductive to change 
the documentation like this as it will cause users to wonder why "rebase 
--autosquash" generates a todo list that is incorrect according to the 
documentation.
quoted
In the case of

pick A
fixup -C B

don't we keep the authorship from A and just use the commit message 
from B?
uhm. we clearly do. that means i was given incorrect advice in 
https://lore.kernel.org/all/YjXRM5HiRizZ035p@ugly/T/#u (local) (and so the 
thread is still looking for a resolution) ...
I'll take a look at that thread and comment there.

I do think it is a good idea to document where the authorship of a 
rebased commit comes from.

Best Wishes

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