Skip to content

Commit

Permalink
import-tars: brown paper bag fix for file mode.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Loeffler authored and Shawn O. Pearce committed Feb 12, 2007
1 parent ea5e370 commit d63ea11
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions contrib/fast-import/import-tars.perl
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@
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";

Expand Down

0 comments on commit d63ea11

Please sign in to comment.