@matheusbsbs / matheus-bagliano / commits / 54dd99a127
Fork 0

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 <junkio@cox.net>

Junio C Hamano committed Dec 2, 2005 at 00:54 UTC 54dd99a127caf4d20e1b91a43949655763d188ed
1 file changed +8
git-merge-one-file.sh
+8
@@ -58,6 +58,14 @@ case "${1:-.}${2:-.}${3:-.}" in
58 # Modified in both, but differently.
59 #
60 "$1$2$3" | ".$2$3")
61 +
62 + case ",$6,$7," in
63 + *,120000,*)
64 + echo "ERROR: $4: Not merging symbolic link changes."
65 + exit 1
66 + ;;
67 + esac
68 +
69 src2=`git-unpack-file $3`
70 case "$1" in
71 '')