From: Larry D'Anna Date: Tue, 09 Feb 2010 05:54:00 GMT Subject: [PATCH 2/4] git-push: squelch advice message if in --porcelain mode Message-ID: <82ed08a77b08dd046be932ad4c08f65136c22c29.1265694627.git.larry@elder-gods.org> In-Reply-To: <1d1ce7e0ad28fd0cad8d9d7bfeda04ba58be36d4.1265694627.git.larry@elder-gods.org> 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 --- 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