From: Junio C Hamano <gitster@pobox.com>
To: David Turner <dturner@twosigma.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/3] diff --submodule=diff: Don't print failure message twice
Date: Mon, 26 Jul 2021 15:47:40 -0700 [thread overview]
Message-ID: <xmqqzgu8g0ab.fsf@gitster.g> (raw)
In-Reply-To: <20210726183358.3255233-3-dturner@twosigma.com> (David Turner's message of "Mon, 26 Jul 2021 14:33:58 -0400")
David Turner <dturner@twosigma.com> writes:
> When we fail to start a diff command inside a submodule, immediately
> exit the routine rather than trying to finish the command and printing
> a second message.
>
> Signed-off-by: David Turner <dturner@twosigma.com>
> ---
> submodule.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/submodule.c b/submodule.c
> index 9031527a16..0acfad3d4c 100644
> --- a/submodule.c
> +++ b/submodule.c
> @@ -713,8 +713,10 @@ void show_submodule_inline_diff(struct diff_options *o, const char *path,
> strvec_push(&cp.args, oid_to_hex(new_oid));
>
> prepare_submodule_repo_env(&cp.env_array);
> - if (start_command(&cp))
> + if (start_command(&cp)) {
> diff_emit_submodule_error(o, "(diff failed)\n");
> + goto done;
> + }
>
> while (strbuf_getwholeline_fd(&sb, cp.out, '\n') != EOF)
> diff_emit_submodule_pipethrough(o, sb.buf, sb.len);
Again, makes sense. Thanks.
next prev parent reply other threads:[~2021-07-26 22:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-26 18:33 [PATCH 1/3] Remove unused var David Turner
2021-07-26 18:33 ` [PATCH 2/3] diff --submodule=diff: do not fail on ever-initialied deleted submodules David Turner
2021-07-26 22:57 ` Junio C Hamano
2021-07-27 17:35 ` David Turner
2021-08-31 6:17 ` Junio C Hamano
2021-08-31 13:12 ` [PATCH v4 1/3] Remove unused var David Turner
2021-08-31 13:12 ` [PATCH v4 2/3] diff --submodule=diff: do not fail on ever-initialied deleted submodules David Turner
2021-08-31 13:12 ` [PATCH v4 3/3] diff --submodule=diff: Don't print failure message twice David Turner
2021-08-31 17:16 ` [PATCH v4 1/3] Remove unused var Junio C Hamano
2021-07-26 18:33 ` [PATCH 3/3] diff --submodule=diff: Don't print failure message twice David Turner
2021-07-26 22:47 ` Junio C Hamano [this message]
2021-07-26 22:47 ` [PATCH 1/3] Remove unused var Junio C Hamano
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=xmqqzgu8g0ab.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=dturner@twosigma.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.