Skip to content

Commit e98c6a1

Browse files
committed
Merge branch 'maint'
* maint: fast-import: Cleanup mode setting. Git.pm: call Error::Simple() properly
2 parents 6a15416 + 4f8b899 commit e98c6a1

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

fast-import.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,12 +1872,13 @@ static void file_change_m(struct branch *b)
18721872
if (!p)
18731873
die("Corrupt mode: %s", command_buf.buf);
18741874
switch (mode) {
1875+
case 0644:
1876+
case 0755:
1877+
mode |= S_IFREG;
18751878
case S_IFREG | 0644:
18761879
case S_IFREG | 0755:
18771880
case S_IFLNK:
18781881
case S_IFGITLINK:
1879-
case 0644:
1880-
case 0755:
18811882
/* ok */
18821883
break;
18831884
default:
@@ -1944,7 +1945,7 @@ static void file_change_m(struct branch *b)
19441945
typename(type), command_buf.buf);
19451946
}
19461947

1947-
tree_content_set(&b->branch_tree, p, sha1, S_IFREG | mode, NULL);
1948+
tree_content_set(&b->branch_tree, p, sha1, mode, NULL);
19481949
}
19491950

19501951
static void file_change_d(struct branch *b)

perl/Git.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,8 +1011,8 @@ sub _temp_cache {
10111011
my $temp_fd = \$TEMP_FILEMAP{$name};
10121012
if (defined $$temp_fd and $$temp_fd->opened) {
10131013
if ($TEMP_FILES{$$temp_fd}{locked}) {
1014-
throw Error::Simple("Temp file with moniker '",
1015-
$name, "' already in use");
1014+
throw Error::Simple("Temp file with moniker '" .
1015+
$name . "' already in use");
10161016
}
10171017
} else {
10181018
if (defined $$temp_fd) {

0 commit comments

Comments
 (0)