Re: [PATCH v13] [GSOC] commit: add --trailer option

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

 



On Tue, Mar 23, 2021 at 7:19 AM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> Christian Couder <christian.couder@xxxxxxxxx> writes:
>
> > If you want nothing to happen when $ARG isn't set, you can change the
> > config option to something like:
> >
> > $ git config trailer.sign.command "NAME='\$ARG'; test -n \"\$NAME\" &&
> > git log --author=\"\$NAME\" -1 --format='format:%aN <%aE>' || true"
> >
> > (This is because it looks like $ARG is replaced only once with the
> > actual value, which is perhaps a bug. Otherwise something like the
> > following might work:
>
> I do not know the origin of that code in trailers.c but it feels
> quite confused and error prone to use textual replacement with
> strbuf_replace().  Why doesn't the code, which knows it will use
> shell to execute the command line given by the end user in the
> configuration, to just export ARG as an environment variable and
> be done with it?  It would also avoid quoting problem etc.

Yeah, I agree that would be better.



[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