Re: [PATCH RFC 11/11] builtin/history: implement "split" subcommand

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 22, 2025 at 11:08:22AM -0700, Junio C Hamano wrote:
> Patrick Steinhardt <ps@xxxxxx> writes:
> 
> >> Interesting. I can see using the original as the template for _both_,
> >> or the first instead of the second. jj's split works a little
> >> differently (especially with their notion of descriptions), so I can't
> >> use them as a reference for the behavior.
> >> 
> >> I suppose this is one of those "everybody has their preference"
> >> things, but I think giving the message in both new commits as the
> >> template gives splitters the most information available when writing
> >> the message. (Of course, in my editor, I can presumably do something
> >> like ":Git show -s <split-commit-ish>" if I want.)
> 
> In other words, removing is easy, while remembering and retyping is
> harder.
> 
> When I split an existing commit, that is almost always because after
> doing too many things in a single commit and the time I realize it
> is when I am writing the commit message.  So I would suggest to give
> the same original message to both, to avoid losing information.

For now I'll rework this a bit so that the editor will list all changes
in the split-out commit, similar to how git-commit(1) does it. That at
least makes it way easier to see what you're currently changing. I'll
think about this some more though.

Patrick




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux