mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
bc5c5ec044
Since this header showed up in some places besides just #include statements, update/clean-up/remove those other places as well. Note that compat/fsmonitor/fsm-path-utils-darwin.c previously got away with violating the rule that all files must start with an include of git-compat-util.h (or a short-list of alternate headers that happen to include it first). This change exposed the violation and caused it to stop building correctly; fix it by having it include git-compat-util.h first, as per policy. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
20 lines
393 B
C
20 lines
393 B
C
#include "git-compat-util.h"
|
|
#include "hash-ll.h"
|
|
|
|
int git_SHA1_Update_Chunked(platform_SHA_CTX *c, const void *data, size_t len)
|
|
{
|
|
size_t nr;
|
|
size_t total = 0;
|
|
const char *cdata = (const char*)data;
|
|
|
|
while (len) {
|
|
nr = len;
|
|
if (nr > SHA1_MAX_BLOCK_SIZE)
|
|
nr = SHA1_MAX_BLOCK_SIZE;
|
|
platform_SHA1_Update(c, cdata, nr);
|
|
total += nr;
|
|
cdata += nr;
|
|
len -= nr;
|
|
}
|
|
return total;
|
|
}
|