From 8faea4f3b2f68a6ef168c6ada1627835380a570d Mon Sep 17 00:00:00 2001 From: Jay Soffian Date: Tue, 13 Jan 2009 17:41:35 -0500 Subject: Git.pm: call Error::Simple() properly The error message to Error::Simple() must be passed as a single argument. Signed-off-by: Jay Soffian Signed-off-by: Junio C Hamano --- perl/Git.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perl/Git.pm b/perl/Git.pm index ba94453781..29a17839f3 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -1012,8 +1012,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) { -- cgit v1.2.3 From 3d1d81eba29d5cfc5b214dc049b743ffbe032ef4 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Wed, 14 Jan 2009 03:37:07 +0200 Subject: fast-import: Cleanup mode setting. "S_IFREG | mode" makes only sense for 0644 and 0755. Even though doing (S_IFREG | mode) may not hurt when mode is any other supported value, that is only true because S_IFREG mode bit happens to be already on for S_IFLNK or S_IFGITLINK. Signed-off-by: Felipe Contreras Acked-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- fast-import.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fast-import.c b/fast-import.c index d58cca58e5..6d5ee6f463 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1868,12 +1868,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: @@ -1940,7 +1941,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) -- cgit v1.2.3