From: Junio C Hamano Date: Fri, 2 Dec 2005 08:54:50 +0000 (-0800) Subject: merge-one-file: make sure we do not mismerge symbolic links. X-Git-Tag: v0.99.9l^2~11 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=54dd99a127caf4d20e1b91a43949655763d188ed;p=git.git 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 --- diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh index 906098dda..eafef770d 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 '')