summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-01-13 23:12:51 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-01-13 23:12:51 -0800
commite98c6a168635f3fedadc3963680eba69d2e42324 (patch)
tree2f1b4b81a6bc85d61bbfdb0b6d47808207cc4d32
parentMerge branch 'nd/grep-assume-unchanged' (diff)
parentMerge branch 'maint-1.6.0' into maint (diff)
downloadtgif-e98c6a168635f3fedadc3963680eba69d2e42324.tar.xz
Merge branch 'maint'
* maint: fast-import: Cleanup mode setting. Git.pm: call Error::Simple() properly
-rw-r--r--fast-import.c7
-rw-r--r--perl/Git.pm4
2 files changed, 6 insertions, 5 deletions
diff --git a/fast-import.c b/fast-import.c
index a6bce66196..f0e08aca70 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)
diff --git a/perl/Git.pm b/perl/Git.pm
index ad0f530445..7d7f2b1d36 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -1011,8 +1011,8 @@ sub _temp_cache {
my $temp_fd = \$TEMP_FILEMAP{$name};
if (defined $$temp_fd and $$temp_fd->opened) {
if ($TEMP_FILES{$$temp_fd}{locked}) {
- throw Error::Simple("Temp file with moniker '",
- $name, "' already in use");
+ throw Error::Simple("Temp file with moniker '" .
+ $name . "' already in use");
}
} else {
if (defined $$temp_fd) {