Improve error message in rebase conflict
PATCH 1/1 Improve error message in rebase conflict
When the index is unchanged during a rebase conflict resolution, prompt the user to "git add", or alternatively drop the patch using "git rebase --skip".
--- git-am.sh | 4 +++- git-rebase.sh | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-)
git-am.sh +3 -1
@@ -725,7 +725,9 @@ do # working tree. resolved= git diff-index --quiet --cached HEAD -- && { - echo "No changes - did you forget to use 'git add'?" + echo "No changes - did you forget to use 'git add'? " \ + "If you dropped the changes introduced by the patch, " \ + "you should use \"$cmdline --skip\"." stop_here_user_resolve $this } unmerged=$(git ls-files -u)
git-rebase.sh +2 -2
@@ -217,8 +217,8 @@ do die "No rebase in progress?" git diff-files --quiet --ignore-submodules || { - echo "You must edit all merge conflicts and then" - echo "mark them as resolved using git add" + echo "You must edit all merge conflicts and then" \ + "mark them as resolved using 'git add'" exit 1 } if test -d "$dotest"
Signature · 1 line
1.7.1
Heya,
Quoted 5 lines · Ramkumar Ramachandra
git diff-files --quiet --ignore-submodules || {
- echo "You must edit all merge conflicts and then"
- echo "mark them as resolved using git add"
+ echo "You must edit all merge conflicts and then" \
+ "mark them as resolved using 'git add'"
Why is this change not described in the commit message? :)
Signature · 3 lines
Cheers, Sverre Rabbelier
Hi,
Quoted 1 line · Sverre Rabbelier
Why is this change not described in the commit message? :)
I thought it was too trivial to describe. Anyway, here's one:
++ Additionally, fix a line break in a message in git-rebase.sh
-- Ram