aboutsummaryrefslogtreecommitdiff
path: root/git-merge-one-file-script
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-08 16:35:30 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-08 16:35:30 -0700
commitae3858e7e9146208f1608445975e2761c9b0482e (patch)
tree9e1eb12a335477fdadc0157e67e6c40401ba01db /git-merge-one-file-script
parent17ebe977d72290dcdc848b78ae2e65b59d4e1b4c (diff)
downloadgit-ae3858e7e9146208f1608445975e2761c9b0482e.tar.gz
git-ae3858e7e9146208f1608445975e2761c9b0482e.tar.xz
Make sure we error out if we can't remove a file on automatic merges.
Pointed out by Junio.
Diffstat (limited to 'git-merge-one-file-script')
-rwxr-xr-xgit-merge-one-file-script3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-merge-one-file-script b/git-merge-one-file-script
index cf42ff63c..787ac4469 100755
--- a/git-merge-one-file-script
+++ b/git-merge-one-file-script
@@ -21,13 +21,14 @@ case "${1:-.}${2:-.}${3:-.}" in
"$1..")
echo "WARNING: $4 is removed in both branches."
echo "WARNING: This is a potential rename conflict."
+ rm -f -- "$4" || exit 1
exec git-update-cache --remove -- "$4" ;;
#
# Deleted in one and unchanged in the other.
#
"$1.." | "$1.$1" | "$1$1.")
echo "Removing $4"
- rm -f -- "$4"
+ rm -f -- "$4" || exit 1
exec git-update-cache --remove -- "$4" ;;
#
# Added in one.