Merge branch 'maint'
* maint: merge-recursive: fix longstanding bug in merging symlinks merge-index: fix longstanding bug in merging symlinks
This commit is contained in:
commit
5569dad48e
@ -60,7 +60,7 @@ static int merge_entry(int pos, const char *path)
|
|||||||
break;
|
break;
|
||||||
found++;
|
found++;
|
||||||
strcpy(hexbuf[stage], sha1_to_hex(ce->sha1));
|
strcpy(hexbuf[stage], sha1_to_hex(ce->sha1));
|
||||||
sprintf(ownbuf[stage], "%o", ntohl(ce->ce_mode) & (~S_IFMT));
|
sprintf(ownbuf[stage], "%o", ntohl(ce->ce_mode));
|
||||||
arguments[stage] = hexbuf[stage];
|
arguments[stage] = hexbuf[stage];
|
||||||
arguments[stage + 4] = ownbuf[stage];
|
arguments[stage + 4] = ownbuf[stage];
|
||||||
} while (++pos < active_nr);
|
} while (++pos < active_nr);
|
||||||
|
@ -589,7 +589,7 @@ static void update_file_flags(const unsigned char *sha,
|
|||||||
memcpy(lnk, buf, size);
|
memcpy(lnk, buf, size);
|
||||||
lnk[size] = '\0';
|
lnk[size] = '\0';
|
||||||
mkdir_p(path, 0777);
|
mkdir_p(path, 0777);
|
||||||
unlink(lnk);
|
unlink(path);
|
||||||
symlink(lnk, path);
|
symlink(lnk, path);
|
||||||
} else
|
} else
|
||||||
die("do not know what to do with %06o %s '%s'",
|
die("do not know what to do with %06o %s '%s'",
|
||||||
|
Loading…
Reference in New Issue
Block a user