Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Wed, 14 Jan 2009 07:12:51 +0000 (23:12 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Jan 2009 07:12:51 +0000 (23:12 -0800)
* maint:
fast-import: Cleanup mode setting.
Git.pm: call Error::Simple() properly

fast-import.c
perl/Git.pm
index a6bce661963812691503116e8d61d9ef90f96526..f0e08aca70c16e9309dde87954593a76ad37b9ef 100644 (file)
@@ -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)
index ad0f5304450cb7acf86465027f5fd7046e2458b3..7d7f2b1d367b505676032878615b2843eb64ed7b 100644 (file)
@@ -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) {