git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Couder <christian.couder@gmail.com>
To: Lars Schneider <larsxschneider@gmail.com>
Cc: git <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>,
	Jeff King <peff@peff.net>, Ben Peart <Ben.Peart@microsoft.com>,
	Jonathan Tan <jonathantanmy@google.com>,
	Christian Couder <chriscool@tuxfamily.org>
Subject: Re: [PATCH] sub-process: print the cmd when a capability is unsupported
Date: Tue, 15 Aug 2017 21:32:27 +0200	[thread overview]
Message-ID: <CAP8UFD18KbTkQZqEXK6AsPDABda-diaMLLhyFvACeVQLb+qwrA@mail.gmail.com> (raw)
In-Reply-To: <CAP8UFD2KBEVwZE8obaDxf+0AyU4zH0+5bWJzzHazFywgWT9QjQ@mail.gmail.com>

On Tue, Aug 15, 2017 at 9:29 PM, Christian Couder
<christian.couder@gmail.com> wrote:
> On Tue, Aug 15, 2017 at 9:00 PM, Lars Schneider
> <larsxschneider@gmail.com> wrote:
>>
>>> On 15 Aug 2017, at 19:36, Christian Couder <christian.couder@gmail.com> wrote:

>>> @@ -184,8 +185,8 @@ static int handshake_capabilities(struct child_process *process,
>>>                       if (supported_capabilities)
>>>                               *supported_capabilities |= capabilities[i].flag;
>>>               } else {
>>> -                     warning("external filter requested unsupported filter capability '%s'",
>>> -                             p);
>>> +                     warning("subprocess '%s' requested unsupported capability '%s'",
>>> +                             cmd, p);
>>
>> Wouldn't it be possible to use "process->argv[0]"?
>> Shouldn't that be the same as "cmd"?
>
> Well in sub-process.h there is:
>
> /* Members should not be accessed directly. */
> struct subprocess_entry {
>     struct hashmap_entry ent; /* must be the first member! */
>     const char *cmd;
>     struct child_process process;
> };
>
> so if cmd is always the same as process->argv[0], maybe there is no
> need for the cmd member in the first place?

In case it is not clear, what I mean is that if we consider that they
should always be the same, it could be considered a different patch
altogether to just remove the cmd member of this struct.

  reply	other threads:[~2017-08-15 19:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-15 17:36 [PATCH] sub-process: print the cmd when a capability is unsupported Christian Couder
2017-08-15 18:17 ` Jonathan Tan
2017-08-16  0:22   ` Jonathan Nieder
2017-08-16 12:37     ` Christian Couder
2017-08-16 15:58       ` Junio C Hamano
2017-08-17  5:34         ` Christian Couder
2017-08-17 21:01           ` Junio C Hamano
2017-08-17 21:34             ` Lars Schneider
2017-08-17 21:49               ` Jonathan Tan
2017-08-15 19:00 ` Lars Schneider
2017-08-15 19:26   ` Junio C Hamano
2017-08-15 19:29   ` Christian Couder
2017-08-15 19:32     ` Christian Couder [this message]
2017-08-15 19:35     ` Lars Schneider
2017-08-15 20:30       ` Christian Couder
2017-08-15 19:01 ` Ben Peart

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

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

  git send-email \
    --in-reply-to=CAP8UFD18KbTkQZqEXK6AsPDABda-diaMLLhyFvACeVQLb+qwrA@mail.gmail.com \
    --to=christian.couder@gmail.com \
    --cc=Ben.Peart@microsoft.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jonathantanmy@google.com \
    --cc=larsxschneider@gmail.com \
    --cc=peff@peff.net \
    /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.
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 NNTP newsgroup(s).