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

Function print_bundle_list

bundle-uri.c:102–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102void print_bundle_list(FILE *fp, struct bundle_list *list)
103{
104 const char *mode;
105
106 switch (list->mode) {
107 case BUNDLE_MODE_ALL:
108 mode = "all";
109 break;
110
111 case BUNDLE_MODE_ANY:
112 mode = "any";
113 break;
114
115 case BUNDLE_MODE_NONE:
116 default:
117 mode = "<unknown>";
118 }
119
120 fprintf(fp, "[bundle]\n");
121 fprintf(fp, "\tversion = %d\n", list->version);
122 fprintf(fp, "\tmode = %s\n", mode);
123
124 if (list->heuristic) {
125 int i;
126 for (i = 0; i < BUNDLE_HEURISTIC__COUNT; i++) {
127 if (heuristics[i].heuristic == list->heuristic) {
128 fprintf(fp, "\theuristic = %s\n",
129 heuristics[list->heuristic].name);
130 break;
131 }
132 }
133 }
134
135 for_all_bundles_in_list(list, summarize_bundle, fp);
136}
137
138/**
139 * Given a key-value pair, update the state of the given bundle list.

Callers 2

cmd__bundle_uri_parseFunction · 0.85
cmd_ls_remoteFunction · 0.85

Calls 1

for_all_bundles_in_listFunction · 0.85

Tested by 2

cmd__bundle_uri_parseFunction · 0.68
cmd_ls_remoteFunction · 0.68