An aborted merge prints the list of rejected paths as part of the
error message. Since commit f66caaf9 (do not overwrite files in
leading path), some of those paths do not have static buffers, so
we have to keep a copy. Use string_list's to accomplish this.
This changes the order of the list to the order in which the paths
are processed. Previously, it was reversed.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Clemens Buchacher14 years agocommitted byJunio C Hamano
error: The following untracked working tree files would be overwritten by merge:
two
three
four
five
four
three
two
Please move or remove them before you can merge.
EOF
@ -49,9 +49,9 @@ test_expect_success 'untracked files overwritten by merge (fast and non-fast for
@@ -49,9 +49,9 @@ test_expect_success 'untracked files overwritten by merge (fast and non-fast for
cat >expect <<\EOF
error: Your local changes to the following files would be overwritten by merge:
two
three
four
three
two
Please, commit your changes or stash them before you can merge.
error: The following untracked working tree files would be overwritten by merge:
five
@ -68,8 +68,8 @@ test_expect_success 'untracked files or local changes ovewritten by merge' '
@@ -68,8 +68,8 @@ test_expect_success 'untracked files or local changes ovewritten by merge' '
cat >expect <<\EOF
error: Your local changes to the following files would be overwritten by checkout:
rep/two
rep/one
rep/two
Please, commit your changes or stash them before you can switch branches.
EOF
@ -89,8 +89,8 @@ test_expect_success 'cannot switch branches because of local changes' '
@@ -89,8 +89,8 @@ test_expect_success 'cannot switch branches because of local changes' '
cat >expect <<\EOF
error: Your local changes to the following files would be overwritten by checkout:
rep/two
rep/one
rep/two
Please, commit your changes or stash them before you can switch branches.