Re: [PATCH] Change "refs/" references to symbolic constants
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 3, 2007, 04:05 UTC
- Message-ID
- <Pine.LNX.4.64.0710030503520.28395@racer.site>
- In-Reply-To
- <20071003025853.GA11440@coredump.intra.peff.net>
Hi,
On Tue, 2 Oct 2007, Jeff King wrote:
Show 11 quoted lines
> On Tue, Oct 02, 2007 at 05:22:23PM -0700, Junio C Hamano wrote: > > > > strbuf_init(&url); > > > strbuf_addf(&url, "%s/objects/pack/pack-%s.idx", repo->base, hex); > > > > Ugh, this typically calls snprintf() twice doesn't it? > > Yes, it probably does. However, I think it is considerably easier to > read and more maintainable. Are you "ugh"ing because of the performance > impact (which should be negligible unless this is in a tight loop) or > because of the portability problems associated with va_copy?
I wonder, I wonder, if
strbuf_addstr(&url, repo->base); strbuf_addstr(&url, "/objects/pack/pack-"); strbuf_addstr(&url, hex); strbuf_addstr(&url, ".idx");
would make anybody else but me happy...
Ciao, Dscho