From 54dd99a127caf4d20e1b91a43949655763d188ed Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 2 Dec 2005 00:54:50 -0800 Subject: [PATCH] merge-one-file: make sure we do not mismerge symbolic links. We ran "merge" command on O->A, O->B, A!=B case without verifying the path involved is not a symlink. Signed-off-by: Junio C Hamano --- git-merge-one-file.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh index 906098dd..eafef770 100755 --- a/git-merge-one-file.sh +++ b/git-merge-one-file.sh @@ -58,6 +58,14 @@ case "${1:-.}${2:-.}${3:-.}" in # Modified in both, but differently. # "$1$2$3" | ".$2$3") + + case ",$6,$7," in + *,120000,*) + echo "ERROR: $4: Not merging symbolic link changes." + exit 1 + ;; + esac + src2=`git-unpack-file $3` case "$1" in '') -- 2.11.0