static const unsigned char *current_bad_sha1;
- struct argv_array {
- const char **argv;
- int argv_nr;
- int argv_alloc;
- };
-
static const char *argv_checkout[] = {"checkout", "-q", NULL, "--", NULL};
static const char *argv_show_branch[] = {"show-branch", NULL, NULL};
+static const char *argv_update_ref[] = {"update-ref", "--no-deref", "BISECT_HEAD", NULL, NULL};
/* bits #0-15 in revision.h */
{
struct rev_info rev;
struct commit *commit;
- struct argv_array argv;
+ struct argv_array argv = ARGV_ARRAY_INIT;
+ /* No need to check if there are no submodules configured */
+ if (!config_name_for_path.nr)
+ return;
+
init_revisions(&rev, NULL);
- init_argv(&argv);
- push_argv(&argv, "--"); /* argv[0] program name */
+ argv_array_push(&argv, "--"); /* argv[0] program name */
sha1_array_for_each_unique(&ref_tips_after_fetch,
add_sha1_to_argv, &argv);
- push_argv(&argv, "--not");
+ argv_array_push(&argv, "--not");
sha1_array_for_each_unique(&ref_tips_before_fetch,
add_sha1_to_argv, &argv);
setup_revisions(argv.argc, argv.argv, &rev, NULL);