• Matthieu Moy's avatar
    merge, pull: stop advising 'commit -a' in case of conflict · 91e70e00
    Matthieu Moy authored
    '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, and even worse, the user may have started a merge
    while having local changes that do not overlap with it in the
    working tree.
    
    While we're there, synchronize the 'git pull' and 'git merge'
    messages: the first was ending with '...  and make a commit.', but
    not the latter.
    
    Eventually, git should detect that conflicts have been resolved in
    the working tree and tailor these messages further.  Not only "use
    git commit -a" could be resurected, but "Fix them up in the work
    tree" should be dropped when it happens.
    Signed-off-by: default avatarMatthieu Moy <Matthieu.Moy@imag.fr>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    91e70e00
advice.c 3.21 KB