diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-04-22 23:37:06 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-04-22 23:37:06 -0700 |
commit | d6958a1a32814af69a7571daa45252018c61f969 (patch) | |
tree | 355fe5cdd4749e67d8979f80f7dcdc649b9aba41 /git-svn.perl | |
parent | 491b1b11213c373a3e91004b1ab775d7e52ac1f3 (diff) | |
parent | 4f7ec7970874d09be162bc7f16415a0ec2d36ae5 (diff) | |
download | git-d6958a1a32814af69a7571daa45252018c61f969.tar.gz git-d6958a1a32814af69a7571daa45252018c61f969.tar.xz |
Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
svn-git: Use binmode for reading/writing binary rev maps
diff options documentation: refer to --diff-filter in --name-status
git-svn bug with blank commits and author file
archive.c: format_subst - fixed bogus argument to memchr
copy.c: copy_fd - correctly report write errors
gitattributes: Fix subdirectory attributes specified from root directory
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-x | git-svn.perl | 7 |
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"; |