git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: "Git List" <git@vger.kernel.org>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: Re: [PATCH 0/3] Remove sq_quote_print() in favor of *_buf
Date: Tue, 30 Jul 2013 08:27:27 -0700	[thread overview]
Message-ID: <7va9l4xe3k.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <7viozsxfcd.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Tue, 30 Jul 2013 08:00:34 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Ramkumar Ramachandra <artagnon@gmail.com> writes:
>
>> While going through the for-each-ref-pretty series that Duy and I were
>> developing, I noticed that this cleanup was independent and good
>> as-it-is.
>>
>> So here it is.
>
> You always can first allocate a piece of memory and write into it
> instead of writing things out directly.  The patch shows it _can_ be
> done, but that is not a news.
>
> And such a change is hardly a "clean-up".  It just wastes more
> memory you do not have to waste, in order to do what you are doing.
>
> When there is a reason why you need an in-memory representation,
> this change starts to become the first step refactoring for an
> enhancement.

Having said all that, the patch texts all look OK, so I'll queue
them with updated log messages.  It was the usual me reacting to
unjustified value judgement made in log messages and cover letters.

It would save me a lot of work if people stopped doing that and
instead stuck to facts.  For example, between print_to_buf() and
print_to_stdout(), the former is *not* necessarily "nicer".  It is
more flexible but that flexibility comes with a price, and the
caller needs a demonstrative need for that flexibility to justify
the cost.

Thanks.

  reply	other threads:[~2013-07-30 15:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-30  8:31 [PATCH 0/3] Remove sq_quote_print() in favor of *_buf Ramkumar Ramachandra
2013-07-30  8:31 ` [PATCH 1/3] for-each-ref, quote: convert *_quote_print -> *_quote_buf Ramkumar Ramachandra
2013-07-30  8:31 ` [PATCH 2/3] tar-tree: remove dependency on sq_quote_print() Ramkumar Ramachandra
2013-07-30  8:31 ` [PATCH 3/3] quote: remove sq_quote_print() Ramkumar Ramachandra
2013-07-30 15:00 ` [PATCH 0/3] Remove sq_quote_print() in favor of *_buf Junio C Hamano
2013-07-30 15:27   ` Junio C Hamano [this message]
2013-07-30 23:20     ` Ramkumar Ramachandra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7va9l4xe3k.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).