Re: [PATCH 3/2] batch check whether submodule needs pushing into one call
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 15, 2016, 21:08 UTC
- Message-ID
- <xmqq1t0kna51.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20160915121044.GA96648@book.hvoigt.net>
Heiko Voigt <hvoigt@hvoigt.net> writes:
Show 10 quoted lines
> if (for_each_remote_ref_submodule(path, has_remote, NULL) > 0) {
> struct child_process cp = CHILD_PROCESS_INIT;
> - const char *argv[] = {"rev-list", NULL, "--not", "--remotes", "-n", "1" , NULL};
> +
> + argv_array_push(&cp.args, "rev-list");
> + sha1_array_for_each_unique(hashes, append_hash_to_argv, &cp.args);
> + argv_array_pushl(&cp.args, "--not", "--remotes", "-n", "1" , NULL);
> +
> struct strbuf buf = STRBUF_INIT;
> int needs_pushing = 0;These two become decl-after-stmt; move your new lines a bit lower, perhaps?
> - argv[1] = sha1_to_hex(sha1); > - cp.argv = argv; > prepare_submodule_repo_env(&cp.env_array);
By the way, with the two new patches, 'pu' seems to start failing some tests, e.g. 5533 5404 5405.