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

Function print_sorted_commit_ids

t/helper/test-reach.c:14–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12#include "tag.h"
13
14static void print_sorted_commit_ids(struct commit_list *list)
15{
16 struct string_list s = STRING_LIST_INIT_DUP;
17
18 while (list) {
19 string_list_append(&s, oid_to_hex(&list->item->object.oid));
20 list = list->next;
21 }
22
23 string_list_sort(&s);
24
25 for (size_t i = 0; i < s.nr; i++)
26 printf("%s\n", s.items[i].string);
27
28 string_list_clear(&s, 0);
29}
30
31int cmd__reach(int ac, const char **av)
32{

Callers 1

cmd__reachFunction · 0.85

Calls 4

oid_to_hexFunction · 0.85
string_list_clearFunction · 0.85
string_list_appendFunction · 0.50
string_list_sortFunction · 0.50

Tested by

no test coverage detected