Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  merge-recursive: fix longstanding bug in merging symlinks
  merge-index: fix longstanding bug in merging symlinks
  • Loading branch information
Junio C Hamano committed Feb 26, 2007
2 parents 6c09c45 + 0b1f647 commit 5569dad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion merge-index.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion merge-recursive.c
Original file line number Diff line number Diff line change
Expand Up @@ -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'",
Expand Down

0 comments on commit 5569dad

Please sign in to comment.