MCPcopy Index your code
hub / github.com/git/git / patch_id_add_mode

Function patch_id_add_mode

diff.c:6886–6892  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6884}
6885
6886static void patch_id_add_mode(struct git_hash_ctx *ctx, unsigned mode)
6887{
6888 /* large enough for 2^32 in octal */
6889 char buf[12];
6890 int len = xsnprintf(buf, sizeof(buf), "%06o", mode);
6891 git_hash_update(ctx, buf, len);
6892}
6893
6894/* returns 0 upon success, and writes result into oid */
6895static int diff_get_patch_id(struct diff_options *options, struct object_id *oid, int diff_header_only)

Callers 1

diff_get_patch_idFunction · 0.85

Calls 2

xsnprintfFunction · 0.85
git_hash_updateFunction · 0.85

Tested by

no test coverage detected