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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/1/07, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> "Alex Riesen" <raa.lkml@xxxxxxxxx> 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.

> 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?
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux