diff options
author | Junio C Hamano <junkio@cox.net> | 2007-02-25 18:42:07 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-02-25 19:08:48 -0800 |
commit | 17cd29b25c0f480a3c6e1dd9617d9c6046e3c280 (patch) | |
tree | e3e8071ecf7c3e5867f8e831843561382c472349 /merge-recursive.c | |
parent | 308efc10d890265a4c62a8b58f025aaf8a1f244d (diff) | |
download | git-17cd29b25c0f480a3c6e1dd9617d9c6046e3c280.tar.gz git-17cd29b25c0f480a3c6e1dd9617d9c6046e3c280.tar.xz |
merge-recursive: fix longstanding bug in merging symlinks
Commit 3af244ca added unlink(2) before running symlink(2) to
update the working tree with the merge result, but it was
unlinking a wrong path. This resulted in loss of the path
pointed by a symlink.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index 58989424d..397a7ad85 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -589,7 +589,7 @@ static void update_file_flags(const unsigned char *sha, memcpy(lnk, buf, size); lnk[size] = '\0'; mkdir_p(path, 0777); - unlink(lnk); + unlink(path); symlink(lnk, path); } else die("do not know what to do with %06o %s '%s'", |