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

Re: [PATCH v3 3/4] reset: add option "--merge-safe" to "git reset"

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Sep 17, 2009, 06:38 UTC
Message-ID
<4AB1D957.20902@viscovery.net>
In-Reply-To
<7vk4zykv7o.fsf@alter.siamese.dyndns.org>
Junio C Hamano schrieb:
Show 9 quoted lines
> As we established in the previous round, this is _different_ from --merge,
> but *not* in the sense that --merge is more dangerous and users should be
> using this new option instead, but in the sense that --merge perfectly
> works well for its intended use case, and this new option triggers a mode
> of operation that is meant to be used in a completely different use case,
> which is unspecified in this series without documentation.
> 
> In that light, is --merge-safe still a good name for the option, or merely
> a misleading one?
Do I understand this correctly?
(1) The intended use-case of --merge is to "reset _a_ merge".

(2) The intended use-case of --merge-safe is to point the branch head to a different commit, but to carry the changes that currently are in the index and wd over to the new commit, similar to checkout --merge.

I had mistaken that --merge actually performs (2) because of the striking similarity of the option's name to checkout's --merge. So, IMHO, whatever the new option is named that performs (2) - it introduces an inconsistency, because --merge is already taken.

-- Hannes
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 15 in “"git reset --merge" related improvements”
  1. 0/4 "git reset --merge" related improvementsChristian Couder, Sep 17, 2009
  2. 1/4 reset: add a few tests for "git reset --merge"Christian Couder, Sep 17, 2009
  3. 2/4 reset: use "unpack_trees()" directly instead of "git read-tree"Christian Couder, Sep 17, 2009
  4. 3/4 reset: add option "--merge-safe" to "git reset"Christian Couder, Sep 17, 2009
  5. Junio C HamanoSep 17, 2009
  6. Johannes SixtSep 17, 2009
  7. Junio C HamanoSep 17, 2009
  8. Johannes SixtSep 17, 2009
  9. Christian CouderSep 17, 2009
  10. Johannes SixtSep 17, 2009
  11. Christian CouderSep 17, 2009
  12. Junio C HamanoSep 17, 2009
  13. Christian CouderSep 17, 2009
  14. Daniel BarkalowSep 17, 2009
  15. 4/4 reset: add test cases for "--merge-safe" optionChristian Couder, Sep 17, 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.