Jeff King [off-list ref] writes:
On Mon, Feb 08, 2010 at 01:13:36PM -0800, Junio C Hamano wrote:
quoted
diff --git a/builtin-push.c b/builtin-push.c
index 5633f0a..f5082d8 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;
+ }
I think this is sane.
I am tempted to suggest adding "clear_advice(void)" in advice.[ch], so
that people adding new advices do not have to hunt for even the above
hunk. It would be a good direction to go in general _if_ we will have
more like this --porcelain thing in other parts of the system.
I didn't do so because that "_if_" is still iffy.