Re: [PATCH] sequencer.c: terminate the last line of author-script properly

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

 



Hi Junio

On 18/07/18 18:17, Junio C Hamano wrote:
> Phillip Wood <phillip.wood@xxxxxxxxxxxx> writes:
> 
>>> (I think we had code to do so in "git am"
>>> that was rewritten in C first).
>>
>> The code in builtin/am.c doesn't try to write valid posix shell (if
>> one assumes it is the only consumer of the author script then it
>> doesn't need to) which results in simpler code, but external scripts
>> cannot safely eval it anymore.
> 
> Are you sure about that? If so we probably should see if we can fix> the writer, and better yet, if we can share code with the writer
> discussed here, as presumably we are fixing it in this thread.
> 
> But I do not see how builtin/am.c::write_author_script() would
> produce something that would not eval correctly.  sq_quote_buf() was
> introduced specifically to write correct string for shell's
> consumption.

You're right, I'm not sure how I missed the calls to sq_quote_buf()
yesterday, sharing the am code with the sequencer would clean things up
nicely.

Best Wishes

Phillip




[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