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

Re: squashing patches

From
Stephan Beyer <s-beyer@gmx.net>
Date
Jun 10, 2008, 00:38 UTC
Message-ID
<20080610003816.GH8079@leksak.fem-net>
In-Reply-To
<7vskvmfhjj.fsf@gitster.siamese.dyndns.org>
Hi,
Show 11 quoted lines
> > Example:
> > 	pick ea7beef
> > 	edit		# or "pause" as you suggested
> > After a little discussion this became:
> > 	pick --edit ea7beef
> >
> > And I can't objectively say what's better
> 
> Me neither.  My "expectation" came primarily from what I understood,
> namely you seemt to prefer atomism, and not from "I want things to be this
> way".
Yes I prefer atomism, because it helps to keep things simple and stupid.
> If we think any proposed and future instruction would be reasonable to
> have --edit option, then all insn implementation would need to support
> "edit" option anyway, and the users do not have to remember which insn
> does and does not support --edit

Currently every insn where it makes sense (indeed, this may be subjective) does support --edit. So currently "file" (or "patch"), "pick", "merge" and "squash" do, because they commit something.

But you are right (and I think Peff meant the same), that the separate insn is more generic and thus it's more flexible.

So would you prefer a)"pause" or b)"edit"?
Or as text:
a)
edit [<commit>]::
	Pauses the sequencer process to let you manually make changes.
+
After you have finished your changes and added them to the index,
invoke `git-sequencer --continue`.
If you only want to edit the last commit message with an editor,
run `git commit --amend` (see linkgit:git-commit[1]) before.
+
If `<commit>` is given, pick `<commit>` first. This is a short form for
`pick <commit>` and `edit` on separate lines.)
b)
edit <commit>::
	Picks a commit and pauses the sequencer process to let you
	make changes.
+
This is a short form for `pick <commit> and `pause` on separate lines.
pause::		# (perhaps options may occur later, if they make sense)
	Pauses the sequencer process to let you manually make changes.
+
After you have finished your changes and added them to the index, 
invoke `git-sequencer --continue`.
If you only want to edit the last commit message with an editor,
run `git commit --amend` (see linkgit:git-commit[1]) before.

More flexible and modular seems to be the approach b). But I want your opinion to go sure. ;-)

> I see.  Not using count but setting an explicit mark and using that commit
> sounds more robust, considering that use case.

So I take the --up-to syntax from Paolo? Seemed right to me.

Show 5 quoted lines
> >>  - The "tag" command looked a little out of place;
> >
> > Eh, why?
> 
> Why not?

Because it's practical. The marks are only available during sequencer process and it's just useful to tag something that you can reach by that name afterwards (or during sequencing, too). The user could use tag instead of mark if he wants to keep the ref after sequencing. I also can imagine sequencer-using scripts, that want to tag a version release or something.

> I just wondered why there was a support only for lightweight tag there.

Basically because it's in next :) And then I thought "Ok, nice. Let's keep it.".

> You do not have "branch" command, and your "tag" command does not seem to
> support things like -a, -s, -m<msg>, etc.
Hmmm, -a, -s and -m could even be useful.
Regards,
  Stephan
-- 
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F
Previous: Junio C HamanoNext: Jakub Narebski
Message 21 of 41 in “[RFC] git-sequencer.txt”
  1. Stephan BeyerJun 7, 2008
  2. squashing patches (was: Re: [RFC] git-sequencer.txt)Stephan Beyer, Jun 9, 2008
  3. Johannes SchindelinJun 9, 2008
  4. Paolo BonziniJun 9, 2008
  5. Paolo BonziniJun 9, 2008
  6. Stephan BeyerJun 9, 2008
  7. Paolo BonziniJun 9, 2008
  8. Add git-squash tool and testsStephan Beyer, Jun 9, 2008
  9. Johannes SchindelinJun 9, 2008
  10. Paolo BonziniJun 9, 2008
  11. Johannes SchindelinJun 9, 2008
  12. Stephan BeyerJun 9, 2008
  13. Johannes SchindelinJun 10, 2008
  14. Stephan BeyerJun 9, 2008
  15. Junio C HamanoJun 9, 2008
  16. Stephan BeyerJun 9, 2008
  17. Jeff KingJun 9, 2008
  18. Stephan BeyerJun 9, 2008
  19. Jeff KingJun 10, 2008
  20. Junio C HamanoJun 9, 2008
  21. Stephan BeyerJun 10, 2008
  22. Jakub NarebskiJun 9, 2008
  23. Stephan BeyerJun 10, 2008
  24. Christian CouderJun 10, 2008
  25. Stephan BeyerJun 10, 2008
  26. Christian CouderJun 11, 2008
  27. Daniel BarkalowJun 11, 2008
  28. Jakub NarebskiJun 10, 2008
  29. [RFCv2/FYI] git-sequencer.txtStephan Beyer, Jun 12, 2008
  30. Paolo BonziniJun 12, 2008
  31. Stephan BeyerJun 12, 2008
  32. git-commit: Change --reuse-message to --reuse-commit.Stephan Beyer, Jun 12, 2008
  33. Paolo BonziniJun 12, 2008
  34. Junio C HamanoJun 12, 2008
  35. Stephan BeyerJun 12, 2008
  36. Paolo BonziniJun 13, 2008
  37. Stephan BeyerJun 13, 2008
  38. Paolo BonziniJun 13, 2008
  39. Olivier MarinJun 13, 2008
  40. Jakub NarebskiJun 12, 2008
  41. Stephan BeyerJun 12, 2008

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.