csum-file: abstract uses of SHA-1

Convert several direct uses of SHA-1 to use the_hash_algo instead.
Convert one use of the constant 20 as well.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
brian m. carlson
2018-02-01 02:18:47 +00:00
committed by Junio C Hamano
parent 98a3beab6a
commit 4d2735005a
2 changed files with 7 additions and 7 deletions

View File

@@ -8,7 +8,7 @@ struct hashfile {
int fd;
int check_fd;
unsigned int offset;
git_SHA_CTX ctx;
git_hash_ctx ctx;
off_t total;
struct progress *tp;
const char *name;
@@ -20,7 +20,7 @@ struct hashfile {
/* Checkpoint */
struct hashfile_checkpoint {
off_t offset;
git_SHA_CTX ctx;
git_hash_ctx ctx;
};
extern void hashfile_checkpoint(struct hashfile *, struct hashfile_checkpoint *);