| 6849 | } |
| 6850 | |
| 6851 | void 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 | |
| 6867 | static int patch_id_consume(void *priv, char *line, unsigned long len) |
| 6868 | { |
no test coverage detected