summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorMatthieu Moy <Matthieu.Moy@imag.fr>2010-08-11 08:38:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-11 17:36:06 (GMT)
commite6c111b4c092c0dd24c541b9721f5bc04641dcb0 (patch)
tree55fd6f65b2479bba7d15dece5fad53a451b6369d /t
parent08402b0409bc501deb97cf4388a78ee9f87092c6 (diff)
downloadgit-e6c111b4c092c0dd24c541b9721f5bc04641dcb0.zip
git-e6c111b4c092c0dd24c541b9721f5bc04641dcb0.tar.gz
git-e6c111b4c092c0dd24c541b9721f5bc04641dcb0.tar.bz2
unpack_trees: group error messages by type
When an error is encountered, it calls add_rejected_file() which either - directly displays the error message and stops if in plumbing mode (i.e. if show_all_errors is not initialized at 1) - or stores it so that it will be displayed at the end with display_error_msgs(), Storing the files by error type permits to have a list of files for which there is the same error instead of having a serie of almost identical errors. As each bind_overlap error combines a file and an old file, a list cannot be done, therefore, theses errors are not stored but directly displayed. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t3030-merge-recursive.sh2
-rwxr-xr-xt/t3400-rebase.sh3
-rwxr-xr-xt/t3404-rebase-interactive.sh3
3 files changed, 5 insertions, 3 deletions
diff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh
index d541544..efe2900 100755
--- a/t/t3030-merge-recursive.sh
+++ b/t/t3030-merge-recursive.sh
@@ -294,7 +294,7 @@ test_expect_success 'fail if the index has unresolved entries' '
grep "You have not concluded your merge" out &&
rm -f .git/MERGE_HEAD &&
test_must_fail git merge "$c5" 2> out &&
- grep "Your local changes to .* would be overwritten by merge." out
+ grep "Your local changes to the following files would be overwritten by merge:" out
'
test_expect_success 'merge-recursive remove conflict' '
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index d98c7b5..45ef282 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -129,7 +129,8 @@ test_expect_success 'rebase a single mode change' '
test_expect_success 'Show verbose error when HEAD could not be detached' '
: > B &&
test_must_fail git rebase topic 2> output.err > output.out &&
- grep "Untracked working tree file .B. would be overwritten" output.err
+ grep "The following untracked working tree files would be overwritten by checkout:" output.err &&
+ grep B output.err
'
rm -f B
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 47ca88f..0eb21cb 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -150,8 +150,9 @@ test_expect_success 'abort with error when new base cannot be checked out' '
git rm --cached file1 &&
git commit -m "remove file in base" &&
test_must_fail git rebase -i master > output 2>&1 &&
- grep "Untracked working tree file .file1. would be overwritten" \
+ grep "The following untracked working tree files would be overwritten by checkout:" \
output &&
+ grep "file1" output &&
! test -d .git/rebase-merge &&
git reset --hard HEAD^
'