rebase: make resolve message clearer for inexperienced users

The git UI can be improved by addressing the error messages to those they help: inexperienced and casual git users. To this intent, it is helpful to make sure the terms used in those messages can be understood by this segment of users, and that they guide them to resolve the problem. In particular, failure to apply a patch during a git rebase is a common problem that can be very destabilizing for the inexperienced user. It is important to lead them toward the resolution of the conflict (which is a 3-steps process, thus complex) and reassure them that they can escape a situation they can't handle with "--abort". This commit answer those two points by detailling the resolution process and by avoiding cryptic git linguo. Signed-off-by: William Duclot <william.duclot@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

William Duclot committed Jul 16, 2017 at 21:42 UTC 5fdacc17c7eb2a7b435d62d99b41f75f44f74de1
2 files changed +6 -5
git-rebase.sh
+4 -3
@@ -55,9 +55,10 @@ LF='
55 '
56 ok_to_skip_pre_rebase=
57 resolvemsg="
58 -$(gettext 'When you have resolved this problem, run "git rebase --continue".
59 -If you prefer to skip this patch, run "git rebase --skip" instead.
60 -To check out the original branch and stop rebasing, run "git rebase --abort".')
58 +$(gettext 'Resolve all conflicts manually, mark them as resolved with
59 +"git add/rm <conflicted_files>", then run "git rebase --continue".
60 +You can instead skip this commit: run "git rebase --skip".
61 +To abort and get back to the state before "git rebase", run "git rebase --abort".')
62 "
63 unset onto
64 unset restrict_revision
t/t5520-pull.sh
+2 -2
@@ -305,7 +305,7 @@ test_expect_success '--rebase with conflicts shows advice' '
305 test_tick &&
306 git commit -m "Create conflict" seq.txt &&
307 test_must_fail git pull --rebase . seq 2>err >out &&
308 - test_i18ngrep "When you have resolved this problem" out
308 + test_i18ngrep "Resolve all conflicts manually" out
309 '
310
311 test_expect_success 'failed --rebase shows advice' '
@@ -319,7 +319,7 @@ test_expect_success 'failed --rebase shows advice' '
319 git checkout -f -b fails-to-rebase HEAD^ &&
320 test_commit v2-without-cr file "2" file2-lf &&
321 test_must_fail git pull --rebase . diverging 2>err >out &&
322 - test_i18ngrep "When you have resolved this problem" out
322 + test_i18ngrep "Resolve all conflicts manually" out
323 '
324
325 test_expect_success '--rebase fails with multiple branches' '