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

Re: squashing patches

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 9, 2008, 21:02 UTC
Message-ID
<7vskvmfhjj.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080609204327.GD8079@leksak.fem-net>
Stephan Beyer <s-beyer@gmx.net> writes:
Show 16 quoted lines
>> > Comments? Opinions? Ideas?
>> 
>> I actually expected that the primitive command sequence the backward
>> compatible "edit" would expand to would be a pair, "pick" followed by
>> "pause".
>
> Something "like" this was my veeeery first approach: "edit" with commit
> was the backwards-compatible "edit" and without arguments was your
> "pause".
> 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".

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 so both forms would work equally well (and "--edit option" would make the insn stream shorter, which may be good). But probably "mark --edit" and "reset --edit" would not make sense, so a separate "edit" insn may be more generic and useful.

Show 5 quoted lines
> The open question is, if we should do this by a natural number <n> or
> by a commit.
> The natural number approach seems easier, but imagine someone pauses
> and does some commits (not --amend)... Here the behavior of these
> approaches differs. ;-)

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

Show 5 quoted lines
>> About the other parts in your original message:
>> 
>>  - The "tag" command looked a little out of place;
>
> Eh, why?
Why not?

I just wondered why there was a support only for lightweight tag there. You do not have "branch" command, and your "tag" command does not seem to support things like -a, -s, -m<msg>, etc. Not that I think you should support full "tag" and "branch" command set, but it seemed a bit odd.

Previous: Jeff KingNext: Stephan Beyer
Message 20 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.