diff options
author | Matthieu Moy <Matthieu.Moy@imag.fr> | 2014-08-28 11:46:58 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-08-28 10:29:53 -0700 |
commit | 91e70e00ac3e72eb81e10273b48d884553e7d01d (patch) | |
tree | cbabcaadbcfcd6647936d596eccedda92d95e7e1 /git-pull.sh | |
parent | 6c4ab27f2378ce67940b4496365043119d7ffff2 (diff) | |
download | git-91e70e00ac3e72eb81e10273b48d884553e7d01d.tar.gz |
merge, pull: stop advising 'commit -a' in case of conflictmm/discourage-commit-a-to-finish-conflict-resolution
'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: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-pull.sh')
-rwxr-xr-x | git-pull.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-pull.sh b/git-pull.sh index 18a394fcc4..4d4fc77b05 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -20,7 +20,7 @@ die_conflict () { if [ $(git config --bool --get advice.resolveConflict || echo true) = "true" ]; then die "$(gettext "Pull is not possible because you have unmerged files. Please, fix them up in the work tree, and then use 'git add/rm <file>' -as appropriate to mark resolution, or use 'git commit -a'.")" +as appropriate to mark resolution and make a commit.")" else die "$(gettext "Pull is not possible because you have unmerged files.")" fi |