From: Johannes Sixt Date: Tue, 10 Jan 2017 20:29:43 GMT Subject: Re: [PATCH v4 14/14] mergetool: fix running in subdir when rerere enabled Message-ID: <15bc6621-4131-032c-4af6-8c76a366e4d8@kdbg.org> In-Reply-To: Am 10.01.2017 um 20:25 schrieb Junio C Hamano: > Johannes Sixt writes: >> BTW, the --sq and eval business is not required here. At this point, >> $IFS = $'\n', so >> >> set -- $(git rev-parse --sq --prefix "$prefix" -- "$@") >> >> will do. (Except that it would not detect errors.) > > I thought you are suggesting not to use --sq but it is still there. A copy-paste-p. Of course, I want to suggest not to use --sq. > Unrelated, but I notice that in this: > > eval "set -- $(git rev-parse --sq --prefix "$prefix" -- "$@")" > shift > > It is my fault but it is a roundabout way to say: > > eval "set $(git rev-parse --sq --prefix "$prefix" -- "$@")" Clever! But I fear that half a year down the road we will appreciate a comment like # rev-parse provides the -- needed for `set` and then we are back at two lines, so I dunno... -- Hannes