Merge branch 'maint-1.5.1' into maint
* maint-1.5.1: git-svn: avoid md5 calculation entirely if SVN doesn't provide one Fix stupid typo in lookup_tag()
This commit is contained in:
commit
cdd5b82ee8
16
git-svn.perl
16
git-svn.perl
@ -2472,12 +2472,16 @@ sub close_file {
|
|||||||
my $hash;
|
my $hash;
|
||||||
my $path = $self->git_path($fb->{path});
|
my $path = $self->git_path($fb->{path});
|
||||||
if (my $fh = $fb->{fh}) {
|
if (my $fh = $fb->{fh}) {
|
||||||
seek($fh, 0, 0) or croak $!;
|
if (defined $exp) {
|
||||||
my $md5 = Digest::MD5->new;
|
seek($fh, 0, 0) or croak $!;
|
||||||
$md5->addfile($fh);
|
my $md5 = Digest::MD5->new;
|
||||||
my $got = $md5->hexdigest;
|
$md5->addfile($fh);
|
||||||
die "Checksum mismatch: $path\n",
|
my $got = $md5->hexdigest;
|
||||||
"expected: $exp\n got: $got\n" if (defined $exp && $got ne $exp);
|
if ($got ne $exp) {
|
||||||
|
die "Checksum mismatch: $path\n",
|
||||||
|
"expected: $exp\n got: $got\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
sysseek($fh, 0, 0) or croak $!;
|
sysseek($fh, 0, 0) or croak $!;
|
||||||
if ($fb->{mode_b} == 120000) {
|
if ($fb->{mode_b} == 120000) {
|
||||||
sysread($fh, my $buf, 5) == 5 or croak $!;
|
sysread($fh, my $buf, 5) == 5 or croak $!;
|
||||||
|
2
tag.c
2
tag.c
@ -26,7 +26,7 @@ struct tag *lookup_tag(const unsigned char *sha1)
|
|||||||
if (!obj->type)
|
if (!obj->type)
|
||||||
obj->type = OBJ_TAG;
|
obj->type = OBJ_TAG;
|
||||||
if (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));
|
sha1_to_hex(sha1), typename(obj->type));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user