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 /entry.c | |
parent | Merge branch 'maint' (diff) | |
parent | Tell multi-parent diff about core.symlinks. (diff) | |
download | tgif-e6f95113431f7e69263bc3d075c0a7715ce587e3.tar.xz |
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 'entry.c')
-rw-r--r-- | entry.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -111,9 +111,12 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat return error("git-checkout-index: unable to write file %s", path); break; case S_IFLNK: - if (to_tempfile) { - strcpy(path, ".merge_link_XXXXXX"); - fd = mkstemp(path); + if (to_tempfile || !has_symlinks) { + if (to_tempfile) { + strcpy(path, ".merge_link_XXXXXX"); + fd = mkstemp(path); + } else + fd = create_file(path, 0666); if (fd < 0) { free(new); return error("git-checkout-index: unable to create " |