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

Re: [RFC/PATCH] commit: make the error message on unmerged entries user-friendly.

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 6, 2010, 18:15 UTC
Message-ID
<7v8wcbw14f.fsf@alter.siamese.dyndns.org>
In-Reply-To
<vpqtyuz86ny.fsf@bauges.imag.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 15 quoted lines
> Maybe "sometimes", but to me, that's sufficiently rare to be omited
> here (I don't think I ever used 'git rm' to resolve a conflict). The
> user manual says this:
>
> ,----
> | Each time you resolve the conflicts in a file and update the index:
> | 
> | $ git add file.txt
> | 
> | the different stages of that file will be "collapsed", after which git
> | diff will (by default) no longer show diffs for that file.
> `----
>
> and I don't think it makes sense to try to be more exhaustive here
> than in the user-manual.

I tend to disagree. The user-manual, as it currently stands, is an introductory document that covers the concepts and the surface of git. It's purpose is not to replace the main manual, but to give the necessary foundation _before_ people read the manual.

Show 10 quoted lines
>> The need to give this advice on how to resolve conflicts is shared among
>> commands like 'git merge', 'git cherry-pick', and 'git status', to name a
>> few.
>
> Not sure 'status' needs anything more. It already says
>
> # Unmerged paths:
> #   (use "git add/rm <file>..." as appropriate to mark resolution)
> #
> #       both modified:      foo.txt

This message was exactly what I was getting at. The message in the parentheses is what I called "advice". As I was suggesting to share the advice messages used by commands that deal with mergy situations (like the one you added in your patch), looking at existing examples to find the best one and using that in other places would be the most effective approach. That one line we see above is concise and does mention "rm" as well. Why not use it?

>> I think we should consolidate them all.
>
> Right, although "commit" is definitely the most important (dumb users
> don't need "git merge").

Your "dumb users" don't get the unmerged error from commit, either, if they don't need "git merge".

Previous: Matthieu MoyNext: Matthieu Moy
Message 4 of 14 in “commit: make the error message on unmerged entries user-friendly.”
  1. commit: make the error message on unmerged entries user-friendly.Matthieu Moy, Jan 6, 2010
  2. Junio C HamanoJan 6, 2010
  3. Matthieu MoyJan 6, 2010
  4. Junio C HamanoJan 6, 2010
  5. Matthieu MoyJan 6, 2010
  6. Junio C HamanoJan 6, 2010
  7. Matthieu MoyJan 6, 2010
  8. Be more user-friendly when refusing to do something because of conflict.Matthieu Moy, Jan 6, 2010
  9. Be more user-friendly when refusing to do something because of conflict.Matthieu Moy, Jan 6, 2010
  10. Junio C HamanoJan 6, 2010
  11. Matthieu MoyJan 7, 2010
  12. Be more user-friendly when refusing to do something because of conflict.Matthieu Moy, Jan 7, 2010
  13. Be more user-friendly when refusing to do something because of conflict.Matthieu Moy, Jan 7, 2010
  14. Junio C HamanoJan 13, 2010

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.