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>
Kevin Bracey committed
Mar 24, 2013 at 14:26 UTC
d401acf7036cf01d93d138239edf87a59f9627b4
1 file changed
+7
-7
git-merge-one-file.sh
+7
-7
@@ -69,7 +69,7 @@ case "${1:-.}${2:-.}${3:-.}" in
69
echo "Adding $4"
70
if test -f "$4"
71
then
72
- echo "ERROR: untracked $4 is overwritten by the merge."
72
+ echo "ERROR: untracked $4 is overwritten by the merge." >&2
73
exit 1
74
fi
75
git update-index --add --cacheinfo "$7" "$3" "$4" &&
@@ -82,8 +82,8 @@ case "${1:-.}${2:-.}${3:-.}" in
82
".$3$2")
83
if test "$6" != "$7"
84
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
87
exit 1
88
fi
89
echo "Adding $4"
@@ -98,11 +98,11 @@ case "${1:-.}${2:-.}${3:-.}" in
98
99
case ",$6,$7," in
100
*,120000,*)
101
- echo "ERROR: $4: Not merging symbolic link changes."
101
+ echo "ERROR: $4: Not merging symbolic link changes." >&2
102
exit 1
103
;;
104
*,160000,*)
105
- echo "ERROR: $4: Not merging conflicting submodule changes."
105
+ echo "ERROR: $4: Not merging conflicting submodule changes." >&2
106
exit 1
107
;;
108
esac
@@ -150,14 +150,14 @@ case "${1:-.}${2:-.}${3:-.}" in
150
151
if test $ret != 0
152
then
153
- echo "ERROR: $msg in $4"
153
+ echo "ERROR: $msg in $4" >&2
154
exit 1
155
fi
156
exec git update-index -- "$4"
157
;;
158
159
*)
160
- echo "ERROR: $4: Not handling case $1 -> $2 -> $3"
160
+ echo "ERROR: $4: Not handling case $1 -> $2 -> $3" >&2
161
;;
162
esac
163
exit 1