diff options
| author | Junio C Hamano <junkio@cox.net> | 2007-03-04 17:31:09 -0800 |
|---|---|---|
| committer | Junio C Hamano <junkio@cox.net> | 2007-03-04 17:31:09 -0800 |
| commit | e6f95113431f7e69263bc3d075c0a7715ce587e3 (patch) | |
| tree | 810569356f64b58df52560fcce0d3cfb561014ab /merge-recursive.c | |
| parent | 784b11cd05e7862b0fbcc1251a65669c7004a8df (diff) | |
| parent | a249a9b5a26e841a28f6e993a560d749303cf91c (diff) | |
| download | git-e6f95113431f7e69263bc3d075c0a7715ce587e3.tar.gz | |
Merge branch 'js/symlink'
* js/symlink:
Tell multi-parent diff about core.symlinks.
Handle core.symlinks=false case in merge-recursive.
Add core.symlinks to mark filesystems that do not support symbolic links.
Diffstat (limited to 'merge-recursive.c')
| -rw-r--r-- | merge-recursive.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index 87cd8709bb..c96e1a734c 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -570,7 +570,7 @@ static void update_file_flags(const unsigned char *sha, if (type != OBJ_BLOB) die("blob expected for %s '%s'", sha1_to_hex(sha), path); - if (S_ISREG(mode)) { + if (S_ISREG(mode) || (!has_symlinks && S_ISLNK(mode))) { int fd; if (mkdir_p(path, 0777)) die("failed to create path %s: %s", path, strerror(errno)); @@ -591,6 +591,7 @@ static void update_file_flags(const unsigned char *sha, mkdir_p(path, 0777); unlink(path); symlink(lnk, path); + free(lnk); } else die("do not know what to do with %06o %s '%s'", mode, sha1_to_hex(sha), path); |
