| 2591 | }; |
| 2592 | |
| 2593 | static void print_commit(char sign, struct commit *commit, int verbose, |
| 2594 | int abbrev, FILE *file) |
| 2595 | { |
| 2596 | if (!verbose) { |
| 2597 | fprintf(file, "%c %s\n", sign, |
| 2598 | repo_find_unique_abbrev(the_repository, &commit->object.oid, abbrev)); |
| 2599 | } else { |
| 2600 | struct strbuf buf = STRBUF_INIT; |
| 2601 | pp_commit_easy(CMIT_FMT_ONELINE, commit, &buf); |
| 2602 | fprintf(file, "%c %s %s\n", sign, |
| 2603 | repo_find_unique_abbrev(the_repository, &commit->object.oid, abbrev), |
| 2604 | buf.buf); |
| 2605 | strbuf_release(&buf); |
| 2606 | } |
| 2607 | } |
| 2608 | |
| 2609 | /* |
| 2610 | * Enumerate blob OIDs from a single commit's diff, inserting them into blobs. |
no test coverage detected