From: Matthieu Moy <Matthieu.Moy@grenoble-inp•fr>
To: Junio C Hamano <gitster@pobox•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] merge, pull: stop advising 'commit -a' in case of conflict
Date: Thu, 28 Aug 2014 19:41:44 +0200 [thread overview]
Message-ID: <vpq8um8v7dz.fsf@anie.imag.fr> (raw)
In-Reply-To: <xmqqa96obk1e.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Thu, 28 Aug 2014 10:28:45 -0700")
Junio C Hamano <gitster@pobox•com> writes:
> Matthieu Moy <Matthieu.Moy@imag•fr> writes:
>
>> 'git commit -a' is rarely a good way to mark conflicts as resolved: the
>> user anyway has to go manually through the list of conflicts to do the
>> actual resolution, and it is usually better to use "git add" on each
>> files after doing the resolution.
>>
>> On the other hand, using 'git commit -a' is potentially dangerous, as it
>> makes it very easy to mistakenly commit conflict markers without
>> noticing.
>>
>> While we're there, synchronize the 'git pull' and 'git merge' messages:
>> the first was ending with '... and make a commit.', but not the later.
>>
>> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag•fr>
>> ---
>>> - Hasty-and-careless new users will be incorrectly enticed to type
>>> the command given by "or use 'git commit -a'" at the end of this
>>> advice message without thinking. Perhaps it is safer to stop the
>>> sentence at "... and make a commit." and drop that last bit while
>>> there are conflicts still in the working tree files. We should
>>> use the current end-of-message only when all the conflicts have
>>> been resolved in the working tree.
>>
>> 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.
>
>
>
>> 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.
>
> This paragraph should be in the log message, shouldn't it, probably
> with s/could/should/?
I think the commit message explains well enough why the change is good.
The additional paragraph explains why I did not do it the way your
message suggests (which has to do with the current discussion, but does
not have to be recorded in history IHMO).
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2014-08-28 17:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 18:23 [RFC] improving advice message from "git commit" during a merge Junio C Hamano
2014-08-27 19:18 ` Jeff King
2014-08-27 19:28 ` Junio C Hamano
2014-08-28 9:46 ` [PATCH] merge, pull: stop advising 'commit -a' in case of conflict Matthieu Moy
2014-08-28 17:28 ` Junio C Hamano
2014-08-28 17:41 ` Matthieu Moy [this message]
2014-08-28 18:16 ` Jonathan Nieder
2014-08-28 18:36 ` Junio C Hamano
2014-08-29 6:44 ` Matthieu Moy
2014-08-28 12:17 ` [RFC] improving advice message from "git commit" during a merge Stefan Beller
2014-08-28 17:11 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vpq8um8v7dz.fsf@anie.imag.fr \
--to=matthieu.moy@grenoble-inp$(echo .)fr \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox