From: Stefan Beller <sbeller@google.com>
To: s_shestakov@playrix.com, kostix+git@007spb.ru,
Matthieu.Moy@grenoble-inp.fr, tboegi@web.de
Cc: git@vger.kernel.org, Stefan Beller <sbeller@google.com>
Subject: [PATCH] status: suppress additional warning output in plumbing modes
Date: Fri, 30 Jun 2017 09:28:26 -0700 [thread overview]
Message-ID: <20170630162826.27711-1-sbeller@google.com> (raw)
In-Reply-To: <70c9a162-ac2f-c347-d13b-f24ac24d1133@web.de>
When status is called with '--porcelain' (as implied by '-z'), we promise
to output only messages as described in the man page.
Suppress CRLF warnings.
Signed-off-by: Stefan Beller <sbeller@google.com>
---
Maybe something like this?
builtin/commit.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/builtin/commit.c b/builtin/commit.c
index 00a01f07c3..3705d5ec6f 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -1126,6 +1126,11 @@ static void finalize_deferred_config(struct wt_status *s)
die(_("--long and -z are incompatible"));
}
+ /* suppress all additional output in porcelain mode */
+ if (status_format == STATUS_FORMAT_PORCELAIN ||
+ status_format == STATUS_FORMAT_PORCELAIN_V2)
+ safe_crlf = SAFE_CRLF_FALSE;
+
if (use_deferred_config && status_format == STATUS_FORMAT_UNSPECIFIED)
status_format = status_deferred_config.status_format;
if (status_format == STATUS_FORMAT_UNSPECIFIED)
--
2.13.0.31.g9b732c453e
next prev parent reply other threads:[~2017-06-30 16:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-30 6:00 Bug with automated processing of git status results Сергей Шестаков
2017-06-30 7:12 ` Konstantin Khomoutov
2017-06-30 9:09 ` Matthieu Moy
2017-06-30 9:22 ` Torsten Bögershausen
2017-06-30 16:28 ` Stefan Beller [this message]
2017-07-01 12:49 ` [PATCH] status: suppress additional warning output in plumbing modes Torsten Bögershausen
2017-07-01 13:52 ` Ævar Arnfjörð Bjarmason
2017-07-01 17:35 ` Junio C Hamano
2017-07-05 18:53 ` Stefan Beller
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=20170630162826.27711-1-sbeller@google.com \
--to=sbeller@google.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=kostix+git@007spb.ru \
--cc=s_shestakov@playrix.com \
--cc=tboegi@web.de \
/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).