aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-05-28 23:54:26 -0700
committerJunio C Hamano <junkio@cox.net>2007-05-28 23:54:26 -0700
commitcdd5b82ee8e6941eee9c7b09df63c44789fd5c4b (patch)
treecded11d5f1df83bad67218e61cfb71596567b214
parentc63a3ad2c1d6f86cd7989055a133e06055239317 (diff)
parent7faf068660f0a060066ccbc80f7debbba6bc2d76 (diff)
downloadgit-cdd5b82ee8e6941eee9c7b09df63c44789fd5c4b.tar.gz
git-cdd5b82ee8e6941eee9c7b09df63c44789fd5c4b.tar.xz
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()
-rwxr-xr-xgit-svn.perl16
-rw-r--r--tag.c2
2 files changed, 11 insertions, 7 deletions
diff --git a/git-svn.perl b/git-svn.perl
index fa46236ae..e35006142 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -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 $!;
diff --git a/tag.c b/tag.c
index 330d28792..bbacd59a2 100644
--- a/tag.c
+++ b/tag.c
@@ -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;
}