aboutsummaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl7
1 files changed, 5 insertions, 2 deletions
diff --git a/git-svn.perl b/git-svn.perl
index b864b54a4..b1510495a 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2375,8 +2375,7 @@ sub check_author {
my ($author) = @_;
if (!defined $author || length $author == 0) {
$author = '(no author)';
- }
- if (defined $::_authors && ! defined $::users{$author}) {
+ } elsif (defined $::_authors && ! defined $::users{$author}) {
die "Author: $author not defined in $::_authors file\n";
}
$author;
@@ -2519,6 +2518,7 @@ sub rebuild_from_rev_db {
my ($self, $path) = @_;
my $r = -1;
open my $fh, '<', $path or croak "open: $!";
+ binmode $fh or croak "binmode: $!";
while (<$fh>) {
length($_) == 41 or croak "inconsistent size in ($_) != 41";
chomp($_);
@@ -2616,6 +2616,7 @@ sub rebuild {
sub _rev_map_set {
my ($fh, $rev, $commit) = @_;
+ binmode $fh or croak "binmode: $!";
my $size = (stat($fh))[7];
($size % 24) == 0 or croak "inconsistent size: $size";
@@ -2719,6 +2720,7 @@ sub rev_map_max {
my $map_path = $self->map_path;
stat $map_path or return $want_commit ? (0, undef) : 0;
sysopen(my $fh, $map_path, O_RDONLY) or croak "open: $!";
+ binmode $fh or croak "binmode: $!";
my $size = (stat($fh))[7];
($size % 24) == 0 or croak "inconsistent size: $size";
@@ -2751,6 +2753,7 @@ sub rev_map_get {
return undef unless -e $map_path;
sysopen(my $fh, $map_path, O_RDONLY) or croak "open: $!";
+ binmode $fh or croak "binmode: $!";
my $size = (stat($fh))[7];
($size % 24) == 0 or croak "inconsistent size: $size";