| 6884 | } |
| 6885 | |
| 6886 | static 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 */ |
| 6895 | static int diff_get_patch_id(struct diff_options *options, struct object_id *oid, int diff_header_only) |
no test coverage detected