Re: [RFC PATCH 5/9] sequencer: use const variable for commit message comments

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

 



On Wed, Jan 13, 2021 at 9:37 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> Taylor Blau <me@xxxxxxxxxxxx> writes:

[...]

> > The other nitpick
> > is that its typical to see 'char *foo' instead of 'char foo[]'.
> >
> > So, I'd write these as:
> >
> >     static const char *first_commit_msg_str = N_("This is the 1st commit message:");
> >     static const char *nth_commit_msg_fmt = N_("This is the commit message #%d:");
> >     static const char *skip_nth_commit_msg_fmt = N_("The commit message #%d will be skipped:");
> >     static const char *combined_commit_msg_str = N_("This is a combination of %d commits.");
>
> I actually am OK with []; it saves sizeof(char*) bytes from each of
> the variable, doesn't it?

Yeah, that's my understanding too.



[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