X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=fast-import.c;h=f0e08aca70c16e9309dde87954593a76ad37b9ef;hb=f9686cdc23f143abe111c15c22dd1c2b3c33fd67;hp=a6bce661963812691503116e8d61d9ef90f96526;hpb=9e8f6e7f6e8817db30a492e32fa92c1daf51b77c;p=git.git diff --git a/fast-import.c b/fast-import.c index a6bce6619..f0e08aca7 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1872,12 +1872,13 @@ static void file_change_m(struct branch *b) if (!p) die("Corrupt mode: %s", command_buf.buf); switch (mode) { + case 0644: + case 0755: + mode |= S_IFREG; case S_IFREG | 0644: case S_IFREG | 0755: case S_IFLNK: case S_IFGITLINK: - case 0644: - case 0755: /* ok */ break; default: @@ -1944,7 +1945,7 @@ static void file_change_m(struct branch *b) typename(type), command_buf.buf); } - tree_content_set(&b->branch_tree, p, sha1, S_IFREG | mode, NULL); + tree_content_set(&b->branch_tree, p, sha1, mode, NULL); } static void file_change_d(struct branch *b)