| 223 | } |
| 224 | |
| 225 | static bool gf_commit(gf_fixture_t *fx, const char *tree, const char *parent_one, |
| 226 | const char *parent_two, const char *label, char out[65]) { |
| 227 | char commit[1024]; |
| 228 | int n = snprintf( |
| 229 | commit, sizeof(commit), |
| 230 | "tree %s\n%s%s%s%s%s%s" |
| 231 | "author Git Facts Fixture <fixture@example.invalid> 946684800 +0000\n" |
| 232 | "committer Git Facts Fixture <fixture@example.invalid> 946684800 +0000\n\n%s\n", |
| 233 | tree, parent_one ? "parent " : "", parent_one ? parent_one : "", parent_one ? "\n" : "", |
| 234 | parent_two ? "parent " : "", parent_two ? parent_two : "", parent_two ? "\n" : "", label); |
| 235 | return n > 0 && (size_t)n < sizeof(commit) && gf_object(fx, "commit", commit, (size_t)n, out); |
| 236 | } |
| 237 | |
| 238 | static bool gf_ref(gf_fixture_t *fx, const char *name, const char *oid) { |
| 239 | const char *argv[] = {"update-ref", name, oid, NULL}; |
no test coverage detected