Thread (14 messages) flat view 14 messages, 5 authors, 2016-06-15
STALE3731d

[PATCH 2/4] git-push: squelch advice message if in --porcelain mode

From: Larry D'Anna <hidden>
Date: 2016-06-15 22:48:12
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

By default, git-push may give the user a verbose advice message if a ref is
rejected for not being a fast-forward.  This patch squelches that message for
--porcelain mode.

Signed-off-by: Larry D'Anna <redacted>
---
 builtin-push.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/builtin-push.c b/builtin-push.c
index 0a27072..aacba45 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -226,6 +226,11 @@ int cmd_push(int argc, const char **argv, const char *prefix)
 	git_config(git_default_config, NULL);
 	argc = parse_options(argc, argv, prefix, options, push_usage, 0);
 
+	if (flags & TRANSPORT_PUSH_PORCELAIN) {
+		/* Do not give advice messages to Porcelain scripts */
+		advice_push_nonfastforward = 0;
+	}
+
 	if (deleterefs && (tags || (flags & (TRANSPORT_PUSH_ALL | TRANSPORT_PUSH_MIRROR))))
 		die("--delete is incompatible with --all, --mirror and --tags");
 	if (deleterefs && argc < 2)
-- 
1.7.0.rc1.33.g07cf0f.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help