MCPcopy Create free account
hub / github.com/git/git / flush_one_hunk

Function flush_one_hunk

diff.c:6851–6865  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6849}
6850
6851void flush_one_hunk(struct object_id *result, struct git_hash_ctx *ctx)
6852{
6853 unsigned char hash[GIT_MAX_RAWSZ];
6854 unsigned short carry = 0;
6855 int i;
6856
6857 git_hash_final(hash, ctx);
6858 the_hash_algo->init_fn(ctx);
6859 /* 20-byte sum, with carry */
6860 for (i = 0; i < the_hash_algo->rawsz; ++i) {
6861 carry += result->hash[i] + hash[i];
6862 result->hash[i] = carry;
6863 carry >>= 8;
6864 }
6865}
6866
6867static int patch_id_consume(void *priv, char *line, unsigned long len)
6868{

Callers 2

diff_get_patch_idFunction · 0.85
get_one_patchidFunction · 0.85

Calls 1

git_hash_finalFunction · 0.85

Tested by

no test coverage detected