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

Re: [PATCH 0/3] Add a "fix" command to "rebase --interactive"

From
Nanako Shiraishi <nanako3@lavabit.com>
Date
Dec 4, 2009, 21:27 UTC
Message-ID
<20091205062708.6117@nanako3.lavabit.com>
In-Reply-To
<alpine.DEB.1.00.0912041945161.21557@intel-tinevez-2-302>
Quoting Johannes Schindelin <Johannes.Schindelin@gmx.de>
Show 30 quoted lines
> Hi,
>
> On Fri, 4 Dec 2009, Junio C Hamano wrote:
>
>> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
>> 
>> > Michael J Gruber <git@drmicha.warpmail.net> writes:
>> >
>> >>> If the idea of a "fix" command is acceptable, then I would like to
>> >>> implement a further convenience: if a group of commits to be folded
>> >>> together includes *only* "fix" commits, then the first log message
>> >>> should be used without even opening an editor.  But I would like to
>> >>> get a reaction to the "fix" command in general before doing so.
>> >>
>> >> I'd say that would make a useful command ("fix") even more useful, being
>> >> just the right counterpart to "reword" for trivial commit message fixes.
>> >
>> > +1 for fix, and +1 for the "don't even launch the editor" too.
>> 
>> I like it, too.  Also I vaguely recall that there was a series that died
>> that would have allowed you to give hints to help this behaviour at the
>> time you make "fix-up" commits; we may want to resurrect it on top of this
>> feature.
>
> I'll just repeat this exactly one more time: it is not always possible to 
> know whether you make a fix-up commit, and it is not always possible to be 
> sure that you want to amend the next time you do a rebase.
>
> So: Commit time is definitely a bad time to decide on the action in some 
> future rebase event.
I think Junio is referring to this thread:
  http://thread.gmane.org/gmane.comp.version-control.git/127923/focus=121874

The old patch added a convention to mark a fix-up commit with a special string "!fixup" and refer to which commit in the series it is fixing. It added --autosquash option to rebase--interactive that tells it to move such a commit to an appropriate place in the series and change its 'pick' to 'squash'. I think with Michael's patches, it can change 'pick' to 'fix' instead.

I too think Michael's "fix" is a good feature, and in the workflow by Shawn, he knows he is fixing up an earlier commit, and he knows he doesn't want to add anything to the message by the fix-up commit when he makes that commit (how else would he have messages like "a", "s", or "foo").

I don't think your objection should block *others* (like Shawn and Junio) who can decide when they make commits from using the feature from my old patch to make it even easier to clean up their topics. If *you* can't decide if you want to amend or not when you make a fix-up commit, you can leave your fix-up commits unmarked, run interactive rebase without the --autosquash option, and use Michael's 'fix' manually. People who can sometimes but not always decide when they make commits can do the same when they can't.

Isn't it what Junio suggested by his "on top of this feature", and wouldn't that make everybody happy?

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
Previous: Johannes SchindelinNext: Junio C Hamano
Message 17 of 32 in “Add a "fix" command to "rebase --interactive"”
  1. 0/3 Add a "fix" command to "rebase --interactive"Michael Haggerty, Dec 4, 2009
  2. 1/3 Better document the original repository layout.Michael Haggerty, Dec 4, 2009
  3. Michael J GruberDec 4, 2009
  4. Johannes SchindelinDec 4, 2009
  5. 2/3 Set a couple more tags in the original repository.Michael Haggerty, Dec 4, 2009
  6. Johannes SchindelinDec 4, 2009
  7. 3/3 Add a command "fix" to rebase --interactive.Michael Haggerty, Dec 4, 2009
  8. Johannes SchindelinDec 4, 2009
  9. Junio C HamanoDec 4, 2009
  10. Matthieu MoyDec 4, 2009
  11. Johannes SchindelinDec 4, 2009
  12. Junio C HamanoDec 5, 2009
  13. Michael J GruberDec 4, 2009
  14. Matthieu MoyDec 4, 2009
  15. Junio C HamanoDec 4, 2009
  16. Johannes SchindelinDec 4, 2009
  17. Nanako ShiraishiDec 4, 2009
  18. Junio C HamanoDec 5, 2009
  19. Nanako ShiraishiDec 8, 2009
  20. Junio C HamanoDec 8, 2009
  21. Nanako ShiraishiDec 8, 2009
  22. Junio C HamanoDec 8, 2009
  23. Junio C HamanoDec 8, 2009
  24. Jeff KingDec 8, 2009
  25. Sverre RabbelierDec 8, 2009
  26. Nanako ShiraishiDec 9, 2009
  27. Aaron CohenDec 9, 2009
  28. Junio C HamanoDec 9, 2009
  29. Matthieu MoyDec 8, 2009
  30. Shawn O. PearceDec 4, 2009
  31. Björn GustavssonDec 4, 2009
  32. Junio C HamanoDec 4, 2009

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.