Re: [PATCH 1/5] pretty describe: add name info to struct commit
- From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
- Date
- Nov 4, 2007, 15:06 UTC
- Message-ID
- <472DE012.7040001@lsrfire.ath.cx>
- In-Reply-To
- <20071104140700.GB3078@steel.home>
Alex Riesen schrieb:
Show 18 quoted lines
> René Scharfe, Sun, Nov 04, 2007 12:48:22 +0100:
>> diff --git a/commit.h b/commit.h
>> index b661503..80e94b9 100644
>> --- a/commit.h
>> +++ b/commit.h
>> @@ -18,6 +18,9 @@ struct commit {
>> struct commit_list *parents;
>> struct tree *tree;
>> char *buffer;
>> + char *name;
>> + unsigned int name_flags;
>> + char name_prio;
>> };
>
> It increases size of struct commit by ~12 bytes (assuming 4byte
> allignment), and this is a popular structure. Besides, the three new
> fields used by only git-describe, which nobody has in their top-ten
> used commands (see "best git practices" thread).True. When I was looking for a place for the name info I was a bit worried about this increase, but dismissed it after looking at the kernel repository: there are ca. 140000 commits, which means my patch increased memory usage by 2MB for commands that operate on all commits at the same time. I haven't taken any measurements to back up this estimate, though..
I had looked briefly at the decorate stuff that Dscho mentioned in another reply, but I can't remember why I didn't use it. Guess I wasn't motivated enough by those 2MB. ;-) I'll take another look.
Thanks, René