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

Function bisect_skip

builtin/bisect.c:1111–1146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1109}
1110
1111static enum bisect_error bisect_skip(struct bisect_terms *terms, int argc,
1112 const char **argv)
1113{
1114 int i;
1115 enum bisect_error res;
1116 struct strvec argv_state = STRVEC_INIT;
1117
1118 strvec_push(&argv_state, "skip");
1119
1120 for (i = 0; i < argc; i++) {
1121 const char *dotdot = strstr(argv[i], "..");
1122
1123 if (dotdot) {
1124 struct rev_info revs;
1125 struct commit *commit;
1126
1127 repo_init_revisions(the_repository, &revs, NULL);
1128 setup_revisions(2, argv + i - 1, &revs, NULL);
1129
1130 if (prepare_revision_walk(&revs))
1131 die(_("revision walk setup failed"));
1132 while ((commit = get_revision(&revs)) != NULL)
1133 strvec_push(&argv_state,
1134 oid_to_hex(&commit->object.oid));
1135
1136 reset_revision_walk();
1137 release_revisions(&revs);
1138 } else {
1139 strvec_push(&argv_state, argv[i]);
1140 }
1141 }
1142 res = bisect_state(terms, argv_state.nr, argv_state.v);
1143
1144 strvec_clear(&argv_state);
1145 return res;
1146}
1147
1148static int bisect_visualize(struct bisect_terms *terms, int argc,
1149 const char **argv)

Callers 1

cmd_bisect__skipFunction · 0.85

Calls 11

strvec_pushFunction · 0.85
repo_init_revisionsFunction · 0.85
setup_revisionsFunction · 0.85
prepare_revision_walkFunction · 0.85
get_revisionFunction · 0.85
oid_to_hexFunction · 0.85
reset_revision_walkFunction · 0.85
release_revisionsFunction · 0.85
strvec_clearFunction · 0.85
bisect_stateFunction · 0.70
dieFunction · 0.50

Tested by

no test coverage detected