All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philip Peterson via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>,
	Emily Shaffer <nasamuffin@google.com>,
	Philip Peterson <philip.c.peterson@gmail.com>,
	Philip Peterson <philip.c.peterson@gmail.com>
Subject: [PATCH 4/5] apply: pass through quiet flag to fix t4150
Date: Sun, 18 Feb 2024 07:33:31 +0000	[thread overview]
Message-ID: <c0d670df198eabc20bf89854184db7a100cb3030.1708241613.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1666.git.git.1708241612.gitgitgadget@gmail.com>

From: Philip Peterson <philip.c.peterson@gmail.com>

This test was failing because it expects the invocation of `git apply`
to be silent. Because previous patches introduce verbosity where
previously there was a silent error (in the form of a return code), this
adds an opportunity for a bug to become visible. The bug is in the way
`git am` invokes `git apply`, not passing through --quiet when it is
specified.

Signed-off-by: Philip Peterson <philip.c.peterson@gmail.com>
---
 builtin/am.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/builtin/am.c b/builtin/am.c
index d1990d7edcb..799cb8128a3 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -36,6 +36,7 @@
 #include "mailinfo.h"
 #include "apply.h"
 #include "string-list.h"
+#include "packfile.h"
 #include "pager.h"
 #include "path.h"
 #include "repository.h"
@@ -2412,6 +2413,10 @@ int cmd_am(int argc, const char **argv, const char *prefix)
 
 	argc = parse_options(argc, argv, prefix, options, usage, 0);
 
+	if (state.quiet) {
+		strvec_push(&state.git_apply_opts, "--quiet");
+	}
+
 	if (binary >= 0)
 		fprintf_ln(stderr, _("The -b/--binary option has been a no-op for long time, and\n"
 				"it will be removed. Please do not use it anymore."));
-- 
gitgitgadget


  parent reply	other threads:[~2024-02-18  7:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-18  7:33 [PATCH 0/5] promise: introduce promises to track success or error Philip Peterson via GitGitGadget
2024-02-18  7:33 ` [PATCH 1/5] promise: add promise pattern to track success/error from operations Philip Peterson via GitGitGadget
2024-02-18  7:33 ` [PATCH 2/5] apply: use new promise structures in git-apply logic as a proving ground Philip Peterson via GitGitGadget
2024-02-18  7:33 ` [PATCH 3/5] apply: update t4012 test suite Philip Peterson via GitGitGadget
2024-02-18  7:33 ` Philip Peterson via GitGitGadget [this message]
2024-02-18  7:33 ` [PATCH 5/5] am: update test t4254 by adding the new error text Philip Peterson via GitGitGadget
2024-02-19 14:25 ` [PATCH 0/5] promise: introduce promises to track success or error Phillip Wood
2024-02-20  2:57   ` Jeff King
2024-02-20 10:53     ` Phillip Wood
2024-02-20 12:19       ` Patrick Steinhardt
2024-02-20 16:20         ` Junio C Hamano
2024-02-21 18:03         ` Jeff King
2024-03-12  4:18           ` Philip

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=c0d670df198eabc20bf89854184db7a100cb3030.1708241613.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    --cc=nasamuffin@google.com \
    --cc=philip.c.peterson@gmail.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.
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.