From: "Robin H. Johnson" <robbat2@gentoo.org>
To: git@vger.kernel.org
Subject: [PATCH v3 3/3] bundle-verify: add --quiet
Date: Sun, 10 Nov 2019 12:41:26 -0800 [thread overview]
Message-ID: <20191110204126.30553-3-robbat2@gentoo.org> (raw)
In-Reply-To: <20191110204126.30553-1-robbat2@gentoo.org>
Add --quiet to git-bundle verify as proposed on the mailing list [1].
Reference: https://www.mail-archive.com/git@vger.kernel.org/msg182844.html <robbat2-20190806T191156-796782357Z@orbis-terrarum.net>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
---
Documentation/git-bundle.txt | 2 +-
builtin/bundle.c | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt
index 96bb94df7b..ccada80a4a 100644
--- a/Documentation/git-bundle.txt
+++ b/Documentation/git-bundle.txt
@@ -10,7 +10,7 @@ SYNOPSIS
--------
[verse]
'git bundle' create [-q | --quiet | --progress | --all-progress] [--all-progress-implied] <file> <git-rev-list-args>
-'git bundle' verify <file>
+'git bundle' verify [-q | --quiet] <file>
'git bundle' list-heads <file> [<refname>...]
'git bundle' unbundle <file> [<refname>...]
diff --git a/builtin/bundle.c b/builtin/bundle.c
index 39b3e88d40..f049d27a14 100644
--- a/builtin/bundle.c
+++ b/builtin/bundle.c
@@ -13,7 +13,7 @@
static const char * const builtin_bundle_usage[] = {
N_("git bundle create [<options>] <file> <git-rev-list args>"),
- N_("git bundle verify <file>"),
+ N_("git bundle verify [<options>] <file>"),
N_("git bundle list-heads <file> [<refname>...]"),
N_("git bundle unbundle <file> [<refname>...]"),
NULL
@@ -25,7 +25,7 @@ static const char * const builtin_bundle_create_usage[] = {
};
static const char * const builtin_bundle_verify_usage[] = {
- N_("git bundle verify <file>"),
+ N_("git bundle verify [<options>] <file>"),
NULL
};
@@ -97,8 +97,11 @@ static int cmd_bundle_create(int argc, const char **argv, const char *prefix) {
static int cmd_bundle_verify(int argc, const char **argv, const char *prefix) {
struct bundle_header header;
int bundle_fd = -1;
+ int quiet = 0;
struct option options[] = {
+ OPT_BOOL('q', "quiet", &quiet,
+ N_("do not show bundle details")),
OPT_END()
};
const char* bundle_file;
@@ -111,7 +114,7 @@ static int cmd_bundle_verify(int argc, const char **argv, const char *prefix) {
if ((bundle_fd = read_bundle_header(bundle_file, &header)) < 0)
return 1;
close(bundle_fd);
- if (verify_bundle(the_repository, &header, 1))
+ if (verify_bundle(the_repository, &header, !quiet))
return 1;
fprintf(stderr, _("%s is okay\n"), bundle_file);
return 0;
--
2.23.0
next prev parent reply other threads:[~2019-11-10 20:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1f7f0aa1e8fae54bf967ae83a160be2b30db634f.1573248640.git.gitgitgadget@gmail.com>
2019-11-10 20:41 ` [PATCH v3 1/3] bundle: framework for options before bundle file Robin H. Johnson
2019-11-10 20:41 ` [PATCH v3 2/3] bundle-create: progress output control Robin H. Johnson
2019-11-11 4:07 ` Jeff King
2019-11-11 7:28 ` Robin H. Johnson
2019-11-11 8:10 ` Jeff King
2019-11-11 9:01 ` Junio C Hamano
2019-11-10 20:41 ` Robin H. Johnson [this message]
2019-11-11 4:09 ` [PATCH v3 3/3] bundle-verify: add --quiet Jeff King
2019-11-11 2:34 ` [PATCH v3 1/3] bundle: framework for options before bundle file Junio C Hamano
2019-11-11 3:54 ` Jeff King
2019-11-11 8:46 ` Johannes Schindelin
2019-11-11 9:00 ` Junio C Hamano
2019-11-12 15:09 ` Johannes Schindelin
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=20191110204126.30553-3-robbat2@gentoo.org \
--to=robbat2@gentoo.org \
--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.
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).