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

Re: [PATCH 3/3] reset: Print a warning when user uses "git reset" during a merge

From
Andrew Wong <andrew.kw.w@gmail.com>
Date
Mar 14, 2014, 17:04 UTC
Message-ID
<CADgNjan9kCTMPczFzO4jQvM63EU4x7KnJKszhno5PjHivE9ENg@mail.gmail.com>
In-Reply-To
<5323131C.7070506@xiplink.com>
On Fri, Mar 14, 2014 at 10:33 AM, Marc Branchaud <marcnarc@xiplink.com> wrote:
Show 6 quoted lines
> I know this approach was suggested earlier, but given these dangers it seems
> silly to give this big warning on a plain "git reset" but still go ahead and
> do the things the warning talks about.
>
> Is there any issue with changing "git reset" to error-out now but letting
> "git reset --mixed" proceed?  Something like (note the reworded warning message):

Yeah, I would have preferred to have "git reset" error out right now, because the messed up work tree can be quite a pain to clean up. The main argument for issuing the warning is about maintaining compatibility.

For the users that really did mean "--merge", the warning is silly. It's basically saying "We know that you're about to mess up your work tree, but we let you mess up anyway. Learn the correct way so that you don't mess up next time".

It actually doesn't seem too bad if we did make "git reset" to error out (during a merge) right away. By erroring out, the command won't cause some irreversible damage, and users don't lose data. Yes, it breaks compatibility, but perhaps not in a bad way?

I'm really fine with either. Junio?
Previous: Marc BranchaudNext: Junio C Hamano
Message 8 of 15 in “Make git more user-friendly during a merge conflict”
  1. 0/3 Make git more user-friendly during a merge conflictAndrew Wong, Mar 14, 2014
  2. 1/3 wt-status: Make status messages more consistent with othersAndrew Wong, Mar 14, 2014
  3. Junio C HamanoMar 17, 2014
  4. 2/3 merge: Advise user to use "git merge --abort" to abort mergesAndrew Wong, Mar 14, 2014
  5. Junio C HamanoMar 17, 2014
  6. 3/3 reset: Print a warning when user uses "git reset" during a mergeAndrew Wong, Mar 14, 2014
  7. Marc BranchaudMar 14, 2014
  8. Andrew WongMar 14, 2014
  9. Junio C HamanoMar 14, 2014
  10. Andrew WongMar 14, 2014
  11. Marc BranchaudMar 15, 2014
  12. Junio C HamanoMar 17, 2014
  13. Junio C HamanoMar 17, 2014
  14. Andrew WongMar 17, 2014
  15. Junio C HamanoMar 19, 2014

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.