Re: [PATCH 0/5] Move unquote_path() from git-add--interactive.perl to Git.pm

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

 



On 23/06/17 00:18, Jeff King wrote:
> On Thu, Jun 22, 2017 at 11:26:17AM +0100, Phillip Wood wrote:
> 
>> From: Phillip Wood <phillip.wood@xxxxxxxxxxxxx>
>>
>> I'm using this in some scripts and it would be more convenient to have
>> it available from Git.pm rather than copying and pasting it each time
>> I need it. I think it should be useful to other people using Git.pm as
>> well. It is not uncommon to get a quoted path back from a command that
>> needs to be passed on the commandline of another command. While one
>> can use -z in many cases, that leaves the problem of having to quote
>> the path when printing it in error messages etc.
> 
> Grepping around the calls to unquote_path in add--interactive, I
> definitely think many of them ought to be using "-z". But I don't think
> that's a reason not to make unquote_path() more widely available. It
> _is_ generally useful.
>
> The changes look sane to me. My biggest question is how add--interactive
> handles the exceptions thrown by the refactored function on error. Since
> these paths are coming from Git, it should be something never comes up,
> right? So failing hard is probably the best thing to do.

Yes, my assumption was that the error shouldn't be triggered, and if it
was then it would be a sign of bigger problems.

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