diff options
author | Junio C Hamano <junkio@cox.net> | 2006-08-26 01:08:39 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-08-26 01:08:39 -0700 |
commit | b4c27c186f6282ead5d2af0cfd9b6015b011bc38 (patch) | |
tree | 4ad1f74af2cd95e8cf0ee82a4b06d6c1ffae5611 /pack-check.c | |
parent | 903acca75329841996bbf0c3a32a7cfeb3ae0d0f (diff) | |
parent | a7f051987c5f020e60da1e5d6ddefc3d443d3299 (diff) | |
download | git-b4c27c186f6282ead5d2af0cfd9b6015b011bc38.tar.gz |
Merge branch 'master' into gl/web
* master: (34 commits)
gitweb: git_annotate didn't expect negative numeric timezone
git-svn: add the 'dcommit' command
git-svn: recommend rebase for syncing against an SVN repo
git-svn: establish new connections on commit after fork
describe: fix off-by-one error in --abbrev=40 handling
git-svn(1): improve asciidoc markup
gitview.txt: improve asciidoc markup
git(7): put the synopsis in a verse style paragraph
gitk(1): expand the manpage to look less like a template
git-blame(1): mention options in the synopsis and advertise pickaxe
git-ls-remote(1): document --upload-pack
git-apply(1): document missing options and improve existing ones
update-index -g
n is in fact unused, and is later shadowed.
use name[len] in switch directly, instead of creating a shadowed variable.
builtin-grep.c: remove unused debugging piece.
remove ugly shadowing of loop indexes in subloops.
missing 'static' keywords
git_dir holds pointers to local strings, hence MUST be const.
avoid to use error that shadows the function name, use err instead.
...
Diffstat (limited to 'pack-check.c')
-rw-r--r-- | pack-check.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pack-check.c b/pack-check.c index 3a62e1b7e4..04c6c00821 100644 --- a/pack-check.c +++ b/pack-check.c @@ -29,10 +29,10 @@ static int verify_packfile(struct packed_git *p) pack_base = p->pack_base; SHA1_Update(&ctx, pack_base, pack_size - 20); SHA1_Final(sha1, &ctx); - if (memcmp(sha1, (char *) pack_base + pack_size - 20, 20)) + if (hashcmp(sha1, (unsigned char *)pack_base + pack_size - 20)) return error("Packfile %s SHA1 mismatch with itself", p->pack_name); - if (memcmp(sha1, (char *) index_base + index_size - 40, 20)) + if (hashcmp(sha1, (unsigned char *)index_base + index_size - 40)) return error("Packfile %s SHA1 mismatch with idx", p->pack_name); @@ -135,7 +135,7 @@ int verify_pack(struct packed_git *p, int verbose) SHA1_Init(&ctx); SHA1_Update(&ctx, index_base, index_size - 20); SHA1_Final(sha1, &ctx); - if (memcmp(sha1, (char *) index_base + index_size - 20, 20)) + if (hashcmp(sha1, (unsigned char *)index_base + index_size - 20)) ret = error("Packfile index for %s SHA1 mismatch", p->pack_name); |