Re: [PATCH v3 2/3] git-push: clean up some of the output from git push --porcelain
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 8, 2010, 22:59 UTC
- Message-ID
- <7vmxzj8hca.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20100208213256.GA470@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 16 quoted lines
> On Mon, Feb 08, 2010 at 01:13:36PM -0800, Junio C Hamano wrote:
>
>> 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.