mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
For the functions defined in read-cache.c, move their declarations from cache.h to a new header, read-cache-ll.h. Also move some related inline functions from cache.h to read-cache.h. The purpose of the read-cache-ll.h/read-cache.h split is that about 70% of the sites don't need the inline functions and the extra headers they include. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
21 lines
383 B
C
21 lines
383 B
C
#include "cache.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;
|
|
}
|