Skip to content

Commit 4f8b899

Browse files
committed
Merge branch 'maint-1.6.0' into maint
* maint-1.6.0: fast-import: Cleanup mode setting. Git.pm: call Error::Simple() properly
2 parents 885a1ff + 3d1d81e commit 4f8b899

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
@@ -1010,8 +1010,8 @@ sub _temp_cache {
10101010
my $temp_fd = \$TEMP_FILEMAP{$name};
10111011
if (defined $$temp_fd and $$temp_fd->opened) {
10121012
if ($TEMP_FILES{$$temp_fd}{locked}) {
1013-
throw Error::Simple("Temp file with moniker '",
1014-
$name, "' already in use");
1013+
throw Error::Simple("Temp file with moniker '" .
1014+
$name . "' already in use");
10151015
}
10161016
} else {
10171017
if (defined $$temp_fd) {

0 commit comments

Comments
 (0)