Skip to content

Commit

Permalink
Merge branch 'maint-1.5.1' into maint
Browse files Browse the repository at this point in the history
* maint-1.5.1:
  git-svn: avoid md5 calculation entirely if SVN doesn't provide one
  Fix stupid typo in lookup_tag()
  • Loading branch information
Junio C Hamano committed May 29, 2007
2 parents c63a3ad + 7faf068 commit cdd5b82
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -2472,12 +2472,16 @@ sub close_file {
my $hash;
my $path = $self->git_path($fb->{path});
if (my $fh = $fb->{fh}) {
seek($fh, 0, 0) or croak $!;
my $md5 = Digest::MD5->new;
$md5->addfile($fh);
my $got = $md5->hexdigest;
die "Checksum mismatch: $path\n",
"expected: $exp\n got: $got\n" if (defined $exp && $got ne $exp);
if (defined $exp) {
seek($fh, 0, 0) or croak $!;
my $md5 = Digest::MD5->new;
$md5->addfile($fh);
my $got = $md5->hexdigest;
if ($got ne $exp) {
die "Checksum mismatch: $path\n",
"expected: $exp\n got: $got\n";
}
}
sysseek($fh, 0, 0) or croak $!;
if ($fb->{mode_b} == 120000) {
sysread($fh, my $buf, 5) == 5 or croak $!;
Expand Down
2 changes: 1 addition & 1 deletion tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct tag *lookup_tag(const unsigned char *sha1)
if (!obj->type)
obj->type = OBJ_TAG;
if (obj->type != OBJ_TAG) {
error("Object %s is a %s, not a tree",
error("Object %s is a %s, not a tag",
sha1_to_hex(sha1), typename(obj->type));
return NULL;
}
Expand Down

0 comments on commit cdd5b82

Please sign in to comment.