]> git.ipfire.org Git - thirdparty/git.git/commitdiff
import-tars: brown paper bag fix for file mode.
authorMichael Loeffler <zvpunry@zvpunry.de>
Mon, 12 Feb 2007 14:17:11 +0000 (15:17 +0100)
committerShawn O. Pearce <spearce@spearce.org>
Mon, 12 Feb 2007 17:19:45 +0000 (12:19 -0500)
There is a bug with this $git_mode variable which should be 0644
or 0755, but nothing else I think.

Signed-off-by: Michael Loeffler <zvpunry@zvpunry.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
contrib/fast-import/import-tars.perl

index 26c42c978080c19316e0c4086c07ab2ab47cc7aa..990c9e70b280fe85bc01869312114f677ee0647d 100755 (executable)
@@ -83,10 +83,8 @@ EOF
        foreach my $path (keys %files)
        {
                my ($mark, $mode) = @{$files{$path}};
-               my $git_mode = 0644;
-               $git_mode |= 0700 if $mode & 0111;
                $path =~ s,^([^/]+)/,, if $have_top_dir;
-               printf FI "M %o :%i %s\n", $git_mode, $mark, $path;
+               printf FI "M %o :%i %s\n", $mode & 0111 ? 0755 : 0644, $mark, $path;
        }
        print FI "\n";