git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Heiko Voigt <hvoigt@hvoigt.net>
To: Stefan Beller <sbeller@google.com>
Cc: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>,
	"git@vger.kernel.org" <git@vger.kernel.org>,
	Jens Lehmann <Jens.Lehmann@web.de>,
	Fredrik Gustafsson <iveqy@iveqy.com>,
	Leandro Lucarella <leandro.lucarella@sociomantic.com>
Subject: Re: [PATCH v2 2/3] serialize collection of refs that contain submodule changes
Date: Wed, 12 Oct 2016 15:10:27 +0200	[thread overview]
Message-ID: <20161012131027.GB84247@book.hvoigt.net> (raw)
In-Reply-To: <CAGZ79kZ5CPTuW2fARDs3BUt89b8H_=P3otZv+Vm5nTV70NLWtg@mail.gmail.com>

On Fri, Oct 07, 2016 at 11:16:31AM -0700, Stefan Beller wrote:
> > diff --git a/submodule.c b/submodule.c
> > index 59c9d15905..5044afc2f8 100644
> > --- a/submodule.c
> > +++ b/submodule.c
> > @@ -522,6 +522,13 @@ static int has_remote(const char *refname, const struct object_id *oid,
> >         return 1;
> >  }
> >
> > +static int append_hash_to_argv(const unsigned char sha1[20], void *data)
> > +{
> > +       struct argv_array *argv = (struct argv_array *) data;
> > +       argv_array_push(argv, sha1_to_hex(sha1));
> 
> Nit of the day:
> When using the struct child-process, we have the oldstyle argv NULL
> terminated array as
> well as the new style args argv_array. So in that context we'd prefer
> `args` as a name for
> argv_array as that helps to distinguish from the old array type.
> Here however `argv` seems to be a reasonable name, in fact whenever we
> do not deal with
> child processes, we seem to not like the `args` name:
> 
>     $ git grep argv_array |wc -l
>     577
>     $ git grep argv_array |grep args |wc -l
>     293
> 
> The rest looks good to me. :)

Thanks. So I do not completely get what you are suggesting: args or kept
it the way it is? Since in the end you are saying it is ok here ;) I
mainly chose this name because I am substituting the argv variable which
is already called 'argv' with this array. That might also be the reason
why in so many locations with struct child_processe's we have the 'argv'
name: Because they initially started with the old-style NULL terminated
array.

I am fine with it either way. Just tell me what you like :)

Cheers Heiko

  reply	other threads:[~2016-10-12 13:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07 15:06 [PATCH v2 0/3] Speedup finding of unpushed submodules Heiko Voigt
2016-10-07 15:06 ` [PATCH v2 1/3] serialize collection of changed submodules Heiko Voigt
2016-10-07 17:59   ` Stefan Beller
2016-10-10 22:43     ` Junio C Hamano
2016-10-12 13:00       ` Heiko Voigt
2016-10-12 17:18         ` Junio C Hamano
2016-10-13 15:27           ` Heiko Voigt
2016-10-12 13:11     ` Heiko Voigt
2016-10-07 15:06 ` [PATCH v2 2/3] serialize collection of refs that contain submodule changes Heiko Voigt
2016-10-07 18:16   ` Stefan Beller
2016-10-12 13:10     ` Heiko Voigt [this message]
2016-10-20 23:00       ` Stefan Beller
2016-10-10 22:48   ` Junio C Hamano
2016-10-07 15:06 ` [PATCH v2 3/3] batch check whether submodule needs pushing into one call Heiko Voigt
2016-10-07 18:30   ` Stefan Beller
2016-10-10 22:56   ` Junio C Hamano
2016-10-12 13:33     ` Heiko Voigt
2016-10-12 17:37       ` Junio C Hamano
2016-10-13 15:59         ` Heiko Voigt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161012131027.GB84247@book.hvoigt.net \
    --to=hvoigt@hvoigt.net \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=iveqy@iveqy.com \
    --cc=leandro.lucarella@sociomantic.com \
    --cc=peff@peff.net \
    --cc=sbeller@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).