Re: Git Feature Request (Fixdown in interactive rebase)

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

 



Hi,

On Thu, 24 Dec 2020, Johannes Sixt wrote:

> Am 24.12.20 um 23:21 schrieb Junio C Hamano:
> > I wonder if we deliberately designed how each insn you can write in
> > the todo list should come up with the authorship data (i.e. ident
> > and timestamp), or if we are just using the natural consequence of
> > how the implementation happens to work?  I think it makes sense for
> > "fixup", as an instruction used to make a small tweak to the bulk of
> > work you've done some time ago, to use the authorship information of
> > the original commit that gets fixed up. I don't know offhand what
> > other insns like "edit", "reword", etc. do, and if there is a room
> > to improve them.
>
> For 'squash' it was a deliberate decision to keep authorship of the
> first commit, see 81ab1cb43a87. Initially, 'edit' changed authorship
> including the date to the current author and date; that was changed to
> preserve them, but I cannot find the responsible commit.

Note that a new verb is not even necessary, thanks to the `exec` verb:
Something like this:

	pick <moved-here>
	squash <use-this-commits-message>
	exec git commit --amend -C <use-this-commits-message>

As to the implementation of a hypothetical `fixdown`? It would be a bit
hairy, I think: right now, we rely on the fact that we can find the target
of every fixup!/squash! in the already-parsed todo list. If we do not find
it there, the fixup!/squash! simply won't be auto-squashed. The desired
feature, however, would have to look in the opposite direction. I'd rather
avoid that complexity.

Ciao,
Johannes




[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