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

Re: [PATCH] Allow git_author|committer_info be called in the same expression

From
Alex Riesen <raa.lkml@gmail.com>
Date
Aug 1, 2007, 09:35 UTC
Message-ID
<81b0412b0708010235j3c731b38v32b5a717ae9f1f0b@mail.gmail.com>
In-Reply-To
<7vhcnj7gkt.fsf@assigned-by-dhcp.cox.net>
On 8/1/07, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> "Alex Riesen" <raa.lkml@gmail.com> writes:
>
> >  const char *git_committer_info(int error_on_no_name)
> >  {
> > -     return fmt_ident(getenv("GIT_COMMITTER_NAME"),
> > -                      getenv("GIT_COMMITTER_EMAIL"),
> > -                      getenv("GIT_COMMITTER_DATE"),
> > -                      error_on_no_name);
> > +     static char *buffer;
> > +     if (!buffer)
> > +             buffer = xmalloc(FMT_IDENT_BUFSIZE);
>
> It is not like we are aiming to run on embedded devices, I think

Actually, I am planning to run it on Neo1973 (Openmoko), which is quite embedded with its 128mb.

Show 6 quoted lines
> trying to save static memory when the function is not called
> by doing things like this is not worth it.  Why not just:
>
>         static char buffer[FMT_IDENT_BUFSIZE];
>
> instead?
Just a custom. This is a big bugger, err... buffer.
> As to parts of the system that other people are primarily in
> charge of, git-gui 0.8.0 is already in as promised, updates to
> gitk were merged, and we've had a nice set of improvements from

BTW, gitk. Have you seen the gitk patches regarding errors in non-GIT and not-yet-GIT directory?

Previous: Junio C Hamano
Message 3 of 3 in “Allow git_author|committer_info be called in the same expression”
  1. Allow git_author|committer_info be called in the same expressionAlex Riesen, Jul 31, 2007
  2. Junio C HamanoAug 1, 2007
  3. Alex RiesenAug 1, 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.