unpack-trees: print "Aborting" to stderr
display_error_msgs() prints all the errors to stderr already (if any), followed by "Aborting" (if any) to stdout. Make the latter go to stderr instead. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael J Gruber committed
Sep 21, 2011 at 09:48 UTC
6f90969ba88ab862806e58abc6b7047afbc64d27
3 files changed
+7
-1
t/t7607-merge-overwrite.sh
+1
@@ -107,6 +107,7 @@ error: The following untracked working tree files would be overwritten by merge:
107
sub
108
sub2
109
Please move or remove them before you can merge.
110
+Aborting
111
EOF
112
113
test_expect_success 'will not overwrite untracked file in leading path' '
t/t7609-merge-co-error-msgs.sh
+5
@@ -32,6 +32,7 @@ error: The following untracked working tree files would be overwritten by merge:
32
three
33
two
34
Please move or remove them before you can merge.
35
+Aborting
36
EOF
37
38
test_expect_success 'untracked files overwritten by merge (fast and non-fast forward)' '
@@ -56,6 +57,7 @@ Please, commit your changes or stash them before you can merge.
57
error: The following untracked working tree files would be overwritten by merge:
58
five
59
Please move or remove them before you can merge.
60
+Aborting
61
EOF
62
63
test_expect_success 'untracked files or local changes ovewritten by merge' '
@@ -71,6 +73,7 @@ error: Your local changes to the following files would be overwritten by checkou
73
rep/one
74
rep/two
75
Please, commit your changes or stash them before you can switch branches.
76
+Aborting
77
EOF
78
79
test_expect_success 'cannot switch branches because of local changes' '
@@ -92,6 +95,7 @@ error: Your local changes to the following files would be overwritten by checkou
95
rep/one
96
rep/two
97
Please, commit your changes or stash them before you can switch branches.
98
+Aborting
99
EOF
100
101
test_expect_success 'not uptodate file porcelain checkout error' '
@@ -105,6 +109,7 @@ error: Updating the following directories would lose untracked files in it:
109
rep
110
rep2
111
112
+Aborting
113
EOF
114
115
test_expect_success 'not_uptodate_dir porcelain checkout error' '
unpack-trees.c
+1
-1
@@ -159,7 +159,7 @@ static void display_error_msgs(struct unpack_trees_options *o)
159
string_list_clear(rejects, 0);
160
}
161
if (something_displayed)
162
- printf("Aborting\n");
162
+ fprintf(stderr, "Aborting\n");
163
}
164
165
/*