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

Function bisect_visualize

builtin/bisect.c:1148–1183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1146}
1147
1148static int bisect_visualize(struct bisect_terms *terms, int argc,
1149 const char **argv)
1150{
1151 struct child_process cmd = CHILD_PROCESS_INIT;
1152 struct strbuf sb = STRBUF_INIT;
1153
1154 if (bisect_next_check(terms, NULL) != 0)
1155 return BISECT_FAILED;
1156
1157 cmd.no_stdin = 1;
1158 if (!argc) {
1159 if ((getenv("DISPLAY") || getenv("SESSIONNAME") || getenv("MSYSTEM") ||
1160 getenv("SECURITYSESSIONID")) && exists_in_PATH("gitk")) {
1161 strvec_push(&cmd.args, "gitk");
1162 } else {
1163 strvec_push(&cmd.args, "log");
1164 cmd.git_cmd = 1;
1165 }
1166 } else {
1167 if (argv[0][0] == '-') {
1168 strvec_push(&cmd.args, "log");
1169 cmd.git_cmd = 1;
1170 } else if (strcmp(argv[0], "tig") && !starts_with(argv[0], "git"))
1171 cmd.git_cmd = 1;
1172
1173 strvec_pushv(&cmd.args, argv);
1174 }
1175
1176 strvec_pushl(&cmd.args, "--bisect", "--", NULL);
1177
1178 strbuf_read_file(&sb, git_path_bisect_names(), 0);
1179 sq_dequote_to_strvec(sb.buf, &cmd.args);
1180 strbuf_release(&sb);
1181
1182 return run_command(&cmd);
1183}
1184
1185static int get_first_good(const struct reference *ref, void *cb_data)
1186{

Callers 1

cmd_bisect__visualizeFunction · 0.85

Calls 10

bisect_next_checkFunction · 0.85
exists_in_PATHFunction · 0.85
strvec_pushFunction · 0.85
starts_withFunction · 0.85
strvec_pushvFunction · 0.85
strvec_pushlFunction · 0.85
strbuf_read_fileFunction · 0.85
sq_dequote_to_strvecFunction · 0.85
strbuf_releaseFunction · 0.85
run_commandFunction · 0.85

Tested by

no test coverage detected