Browse Source

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>
maint
Junio C Hamano 19 years ago
parent
commit
54dd99a127
  1. 8
      git-merge-one-file.sh

8
git-merge-one-file.sh

@ -58,6 +58,14 @@ case "${1:-.}${2:-.}${3:-.}" in @@ -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
'')

Loading…
Cancel
Save