summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-12-02 00:54:50 -0800
committerJunio C Hamano <junkio@cox.net>2005-12-02 01:08:14 -0800
commit54dd99a127caf4d20e1b91a43949655763d188ed (patch)
tree0280c431c8e48fdd702c8c15ce4cc6b89262c583
parent1c2c10b6e6d86066d68635a2a968c7162498ea41 (diff)
downloadgit-54dd99a127caf4d20e1b91a43949655763d188ed.tar.gz
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>
-rwxr-xr-xgit-merge-one-file.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh
index 906098dda5..eafef770db 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
'')