1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-04-28 06:55:08 +02:00

strvec: fix indentation in renamed calls

Code which split an argv_array call across multiple lines, like:

  argv_array_pushl(&args, "one argument",
                   "another argument", "and more",
		   NULL);

was recently mechanically renamed to use strvec, which results in
mis-matched indentation like:

  strvec_pushl(&args, "one argument",
                   "another argument", "and more",
		   NULL);

Let's fix these up to align the arguments with the opening paren. I did
this manually by sifting through the results of:

  git jump grep 'strvec_.*,$'

and liberally applying my editor's auto-format. Most of the changes are
of the form shown above, though I also normalized a few that had
originally used a single-tab indentation (rather than our usual style of
aligning with the open paren). I also rewrapped a couple of obvious
cases (e.g., where previously too-long lines became short enough to fit
on one), but I wasn't aggressive about it. In cases broken to three or
more lines, the grouping of arguments is sometimes meaningful, and it
wasn't worth my time or reviewer time to ponder each case individually.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2020-07-28 16:26:31 -04:00 committed by Junio C Hamano
parent c972bf4cf5
commit f6d8942b1f
34 changed files with 173 additions and 174 deletions

View File

@ -1397,7 +1397,8 @@ struct child_process *git_connect(int fd[2], const char *url,
transport_check_allowed("file");
conn->trace2_child_class = "transport/file";
if (version > 0) {
strvec_pushf(&conn->env_array, GIT_PROTOCOL_ENVIRONMENT "=version=%d",
strvec_pushf(&conn->env_array,
GIT_PROTOCOL_ENVIRONMENT "=version=%d",
version);
}
}

View File

@ -301,8 +301,7 @@ static void create_pack_file(struct upload_pack_data *pack_data,
strvec_pushf(&pack_objects.args, "--filter=%s", buf.buf);
strbuf_release(&buf);
} else {
strvec_pushf(&pack_objects.args, "--filter=%s",
spec);
strvec_pushf(&pack_objects.args, "--filter=%s", spec);
}
}
if (uri_protocols) {

View File

@ -913,8 +913,7 @@ static void wt_longstatus_print_submodule_summary(struct wt_status *s, int uncom
struct strbuf summary = STRBUF_INIT;
char *summary_content;
strvec_pushf(&sm_summary.env_array, "GIT_INDEX_FILE=%s",
s->index_file);
strvec_pushf(&sm_summary.env_array, "GIT_INDEX_FILE=%s", s->index_file);
strvec_push(&sm_summary.args, "submodule");
strvec_push(&sm_summary.args, "summary");