Subject: Re: [PATCH 1/2] add '%d' pretty format specifier to show decoration

From: René Scharfe <[email-masked]>
Date: Thu, 04 Sep 2008 17:47:07 +0200

Jeff King schrieb:
> On Thu, Sep 04, 2008 at 12:06:18AM +0200, René Scharfe wrote:
>> +	case 'd':
>> +		if (add_again(sb, &c->decoration))
>> +			return 1;
>> +		format_decoration(sb, commit);
>> +		c->decoration.len = sb->len - c->decoration.off;
>> +		return 1;
> 
> The add_again chunk code is for things that take a long time (like
> finding the shortest abbreviation for some hashes). I'm not sure this
> counts as "long", as it is just doing a hash lookup on the decoration.
> On the other hand, I doubt the extra couple of bytes used hurts much.

Yes, you're right -- let's do without caching at first.  If it turns out
that we're too slow we can easily add it later.

Thanks,
René