merge-one-file: make sure we do not mismerge symbolic links.
authorJunio C Hamano <junkio@cox.net>
Fri, 2 Dec 2005 08:54:50 +0000 (00:54 -0800)
committerJunio C Hamano <junkio@cox.net>
Fri, 2 Dec 2005 09:08:14 +0000 (01:08 -0800)
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 <junkio@cox.net>
git-merge-one-file.sh

index 906098dda5a2e9f4490b518eadbdaa4332e8793b..eafef770dbad16b48f25962cd67e8e380f3c8d48 100755 (executable)
@@ -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
        '')