Skip to content

Commit d401acf

Browse files
kjbracey2gitster
authored andcommitted
git-merge-one-file: send "ERROR:" messages to stderr
Signed-off-by: Kevin Bracey <kevin@bracey.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 333ea38 commit d401acf

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

git-merge-one-file.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ case "${1:-.}${2:-.}${3:-.}" in
6969
echo "Adding $4"
7070
if test -f "$4"
7171
then
72-
echo "ERROR: untracked $4 is overwritten by the merge."
72+
echo "ERROR: untracked $4 is overwritten by the merge." >&2
7373
exit 1
7474
fi
7575
git update-index --add --cacheinfo "$7" "$3" "$4" &&
@@ -82,8 +82,8 @@ case "${1:-.}${2:-.}${3:-.}" in
8282
".$3$2")
8383
if test "$6" != "$7"
8484
then
85-
echo "ERROR: File $4 added identically in both branches,"
86-
echo "ERROR: but permissions conflict $6->$7."
85+
echo "ERROR: File $4 added identically in both branches," >&2
86+
echo "ERROR: but permissions conflict $6->$7." >&2
8787
exit 1
8888
fi
8989
echo "Adding $4"
@@ -98,11 +98,11 @@ case "${1:-.}${2:-.}${3:-.}" in
9898

9999
case ",$6,$7," in
100100
*,120000,*)
101-
echo "ERROR: $4: Not merging symbolic link changes."
101+
echo "ERROR: $4: Not merging symbolic link changes." >&2
102102
exit 1
103103
;;
104104
*,160000,*)
105-
echo "ERROR: $4: Not merging conflicting submodule changes."
105+
echo "ERROR: $4: Not merging conflicting submodule changes." >&2
106106
exit 1
107107
;;
108108
esac
@@ -150,14 +150,14 @@ case "${1:-.}${2:-.}${3:-.}" in
150150

151151
if test $ret != 0
152152
then
153-
echo "ERROR: $msg in $4"
153+
echo "ERROR: $msg in $4" >&2
154154
exit 1
155155
fi
156156
exec git update-index -- "$4"
157157
;;
158158

159159
*)
160-
echo "ERROR: $4: Not handling case $1 -> $2 -> $3"
160+
echo "ERROR: $4: Not handling case $1 -> $2 -> $3" >&2
161161
;;
162162
esac
163163
exit 1

0 commit comments

Comments
 (0)