Skip to content

Commit afdeeb0

Browse files
peffgitster
authored andcommitted
push: add --quiet flag
Some transports produce output even without "--verbose" turned on. This provides a way to tell them to be more quiet (whereas simply redirecting might lose error messages). Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3f55e41 commit afdeeb0

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

builtin-push.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
168168
const char *repo = NULL; /* default repository */
169169

170170
struct option options[] = {
171+
OPT_BIT('q', "quiet", &flags, "be quiet", TRANSPORT_PUSH_QUIET),
171172
OPT_BIT('v', "verbose", &flags, "be verbose", TRANSPORT_PUSH_VERBOSE),
172173
OPT_STRING( 0 , "repo", &repo, "repository", "repository"),
173174
OPT_BIT( 0 , "all", &flags, "push all refs", TRANSPORT_PUSH_ALL),

transport.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ struct transport {
3636
#define TRANSPORT_PUSH_MIRROR 8
3737
#define TRANSPORT_PUSH_VERBOSE 16
3838
#define TRANSPORT_PUSH_PORCELAIN 32
39+
#define TRANSPORT_PUSH_QUIET 64
3940

4041
/* Returns a transport suitable for the url */
4142
struct transport *transport_get(struct remote *, const char *);

0 commit comments

Comments
 (0)