diff options
author | Junio C Hamano <junkio@cox.net> | 2007-02-25 19:10:13 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-02-25 19:10:13 -0800 |
commit | 5569dad48e22e7b373ce3ffcc32758163bbd7b42 (patch) | |
tree | 1b263acc52608ae716096abfba527f8b58b3e750 | |
parent | 6c09c451389ade6477d98b05d277aab0dd2f272e (diff) | |
parent | 0b1f6475570b915c56f380f2bd790ff94e606ef4 (diff) | |
download | git-5569dad48e22e7b373ce3ffcc32758163bbd7b42.tar.gz git-5569dad48e22e7b373ce3ffcc32758163bbd7b42.tar.xz |
Merge branch 'maint'
* maint:
merge-recursive: fix longstanding bug in merging symlinks
merge-index: fix longstanding bug in merging symlinks
-rw-r--r-- | merge-index.c | 2 | ||||
-rw-r--r-- | merge-recursive.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/merge-index.c b/merge-index.c index a9983dd78..7027d7865 100644 --- a/merge-index.c +++ b/merge-index.c @@ -60,7 +60,7 @@ static int merge_entry(int pos, const char *path) break; found++; 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 + 4] = ownbuf[stage]; } while (++pos < active_nr); 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'", |