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

Re: [PATCH] merge, pull: stop advising 'commit -a' in case of conflict

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 28, 2014, 18:16 UTC
Message-ID
<20140828181638.GB20185@google.com>
In-Reply-To
<1409219218-9475-1-git-send-email-Matthieu.Moy@imag.fr>
Matthieu Moy wrote:
> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
[...]
> ---
>  advice.c    | 3 +--
>  git-pull.sh | 2 +-
>  2 files changed, 2 insertions(+), 3 deletions(-)
Thanks for taking it on.
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
[...]
> It was already on my todo-list, as a friend of mine semi-beginner with
> Git complained about the mis-advice the other day, and I had to agree.
That's a useful sort of thing to put in a commit message. :)
> Eventually, git could detect that conflicts have been resolved, but
> then that would be a different message, as not only "use git commit
> -a" could be resurected, but "Fix them up in the work tree" should be
> dropped when it is the case.

As is this --- when I wonder why code isn't a certain way, ideas for future work found in the description for the blamed commit are often helpful in explaining the current state and saving me from blind alleys in changing it.

Anyway, this is already a very good change as-is.

Actually, I'd be nervous about suggesting "use git commit -a" without at least also saying "inspect the result or run tests" in the no-conflict-markers-found case. Rerere sometimes makes mistakes, and the result of picking one side when merging binary files can be even worse.

Thanks, Jonathan

Previous: Matthieu MoyNext: Junio C Hamano
Message 7 of 11 in “[RFC] improving advice message from "git commit" during a merge”
  1. Junio C HamanoAug 27, 2014
  2. Jeff KingAug 27, 2014
  3. Junio C HamanoAug 27, 2014
  4. merge, pull: stop advising 'commit -a' in case of conflictMatthieu Moy, Aug 28, 2014
  5. Junio C HamanoAug 28, 2014
  6. Matthieu MoyAug 28, 2014
  7. Jonathan NiederAug 28, 2014
  8. Junio C HamanoAug 28, 2014
  9. Matthieu MoyAug 29, 2014
  10. Stefan BellerAug 28, 2014
  11. Junio C HamanoAug 28, 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.