3 int main(int ac
, char **av
)
6 unsigned char sha1
[20];
11 bufsz
= strtoul(av
[1], NULL
, 10) * 1024 * 1024;
16 while ((buffer
= malloc(bufsz
)) == NULL
) {
17 fprintf(stderr
, "bufsz %u is too big, halving...\n", bufsz
);
28 unsigned room
= bufsz
;
31 sz
= xread(0, cp
, room
);
35 die_errno("test-sha1");
42 git_SHA1_Update(&ctx
, buffer
, this_sz
);
44 git_SHA1_Final(sha1
, &ctx
);
45 puts(sha1_to_hex(sha1
));