Revision 2a983b227dd6df4d8db6e53e2f5be8afad061b60 authored by Junio C Hamano on 13 June 2019, 20:19:43 UTC, committed by Junio C Hamano on 13 June 2019, 20:19:43 UTC
The ownership rule for the file descriptor to fast-import remote backend was mixed up, leading to unrelated file descriptor getting closed, which has been fixed. * mh/import-transport-fd-fix: Use xmmap_gently instead of xmmap in use_pack dup() the input fd for fast-import used for remote helpers
sha1-chunked.c
#include "cache.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;
}
Computing file changes ...