git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/5] pretty describe: add name info to struct commit

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 4, 2007, 14:22 UTC
Message-ID
<Pine.LNX.4.64.0711041420430.4362@racer.site>
In-Reply-To
<20071104140700.GB3078@steel.home>
Hi,
On Sun, 4 Nov 2007, Alex Riesen wrote:
Show 16 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.
I was just about to say something similar.

But there is a wonderful solution: Have a look at decorate.[ch]. This is the structure you should use IMHO.

Ciao, Dscho

Previous: Alex RiesenNext: René Scharfe
Message 3 of 4 in “pretty describe: add name info to struct commit”
  1. 1/5 pretty describe: add name info to struct commitRené Scharfe, Nov 4, 2007
  2. Alex RiesenNov 4, 2007
  3. Johannes SchindelinNov 4, 2007
  4. René ScharfeNov 4, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.