[PATCH] merge-one-file: make sure we do not mismerge symbolic links.
- From
Junio C Hamano <junkio@cox.net>
- Date
- Dec 2, 2005, 09:15 UTC
- Message-ID
- <7vu0dr7tc8.fsf_-_@assigned-by-dhcp.cox.net>
- In-Reply-To
- <7v8xv39a8z.fsf@assigned-by-dhcp.cox.net>
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 | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
01655e7c9a0b05d930aa7e27e74f75e086005bfc
diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh index 906098d..c262dc6 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 '')
-- 0.99.9.GIT