MCPcopy Index your code
hub / github.com/git/git / exclude_cmds

Function exclude_cmds

help.c:206–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes)
207{
208 int ci, cj, ei;
209 int cmp;
210
211 ci = cj = ei = 0;
212 while (ci < cmds->cnt && ei < excludes->cnt) {
213 cmp = strcmp(cmds->names[ci]->name, excludes->names[ei]->name);
214 if (cmp < 0)
215 cmds->names[cj++] = cmds->names[ci++];
216 else if (cmp == 0) {
217 ei++;
218 free(cmds->names[ci++]);
219 } else
220 ei++;
221 }
222
223 while (ci < cmds->cnt)
224 cmds->names[cj++] = cmds->names[ci++];
225
226 cmds->cnt = cj;
227}
228
229static void pretty_print_cmdnames(struct cmdnames *cmds, unsigned int colopts)
230{

Callers 2

load_command_listFunction · 0.85
get_strategyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected