git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] rebase -i: fixup fixup! fixup!

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 25, 2013, 21:45 UTC
Message-ID
<7v61x127bw.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1372190294-sup-1398@pimlott.net>
Andrew Pimlott <andrew@pimlott.net> writes:
> I agree that it is better to preserve information as long as feasible.
> If we are going to strip it, it may as well be later.  That is Thomas's
> rearrange_squash patch, which I will send again.
Thanks.
Show 6 quoted lines
> The next question is, do we go all the way and respect the nested
> fixup!s in rearrange_squash?  I understand the case for it, though it's
> hardly compelling to me in practice. :-)  That would be more complicated
> than Thomas's patch.  But I'm happy to try it if someone gives me a
> nudge.  If not, at least the information is preserved in case someone
> wants to do this later.

I think it is fine not to be too smart, as long as we do not lose information that would help the user to compensate.

After all, autosquash will give the user an opportunity to eyeball the result of automatic rearrangement. If the user did this:

	git commit -m original
        git commit --fixup original ;# obviously fixing the first one
        git commit --fixup '!fixup original' ;# explicitly fixing the second
	git commit --fixup original ;# may want to fix the first one
and then "git rebase --autosquash" gave him this:
	pick d78c915 original
        fixup 0c6388e original
        fixup d15b556 !fixup original
        fixup 1e39bcd original

it may not be what the user originally intended, but I think it is OK.

As long as "!fixup original" message is kept in the buffer, the user can notice and rearrange, e.g.

	pick d78c915 original
        fixup 0c6388e original
        fixup 1e39bcd original
        fixup d15b556 !fixup original
if the user really wants to.
Previous: Junio C HamanoNext: Junio C Hamano
Message 15 of 23 in “rebase --autosquash does not handle fixup! of fixup!”
  1. Andrew PimlottJun 11, 2013
  2. Thomas RastJun 11, 2013
  3. rebase -i: fixup fixup! fixup!Andrew Pimlott, Jun 14, 2013
  4. Andrew PimlottJun 15, 2013
  5. Junio C HamanoJun 15, 2013
  6. Junio C HamanoJun 16, 2013
  7. Thomas RastJun 16, 2013
  8. Junio C HamanoJun 17, 2013
  9. Thomas RastJun 17, 2013
  10. Junio C HamanoJun 17, 2013
  11. Andrew PimlottJun 25, 2013
  12. Junio C HamanoJun 25, 2013
  13. Andrew PimlottJun 25, 2013
  14. Junio C HamanoJun 25, 2013
  15. Junio C HamanoJun 25, 2013
  16. Junio C HamanoJun 25, 2013
  17. Andrew PimlottJun 25, 2013
  18. Andrew PimlottJun 26, 2013
  19. Junio C HamanoJun 26, 2013
  20. Andrew PimlottJun 27, 2013
  21. Andrew PimlottJun 27, 2013
  22. Junio C HamanoJun 27, 2013
  23. Andrew PimlottJun 28, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.