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

Function get_hash_hex_algop

hex.c:8–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include "strbuf.h"
7
8static int get_hash_hex_algop(const char *hex, unsigned char *hash,
9 const struct git_hash_algo *algop)
10{
11 for (size_t i = 0; i < algop->rawsz; i++) {
12 int val = hex2chr(hex);
13 if (val < 0)
14 return -1;
15 *hash++ = val;
16 hex += 2;
17 }
18 return 0;
19}
20
21int get_hash_hex(const char *hex, unsigned char *sha1)
22{

Callers 2

get_hash_hexFunction · 0.85
get_oid_hex_algopFunction · 0.85

Calls 1

hex2chrFunction · 0.85

Tested by

no test coverage detected