summaryrefslogtreecommitdiff
path: root/entry.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2007-03-04 17:31:09 -0800
committerLibravatar Junio C Hamano <junkio@cox.net>2007-03-04 17:31:09 -0800
commite6f95113431f7e69263bc3d075c0a7715ce587e3 (patch)
tree810569356f64b58df52560fcce0d3cfb561014ab /entry.c
parentMerge branch 'maint' (diff)
parentTell multi-parent diff about core.symlinks. (diff)
downloadtgif-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.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/entry.c b/entry.c
index 21b5f2e26d..d72f811580 100644
--- a/entry.c
+++ b/entry.c
@@ -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 "