Re: [PATCH] t5528: do not fail with FreeBSD shell

2015-03-08 Thread Jeff King
On Sun, Mar 08, 2015 at 10:19:20PM -0700, Kyle J. McKay wrote: > >I am not convinced this isn't a violation of POSIX (which specifies that > >field splitting is done on the results of parameter expansions outside > >of double-quotes). But whether it is or not, we have to live with it. > > That's

Re: [PATCH] t5528: do not fail with FreeBSD shell

2015-03-08 Thread Kyle J. McKay
On Mar 8, 2015, at 10:56, Jeff King wrote: On Sun, Mar 08, 2015 at 08:37:50AM -0700, Kyle J. McKay wrote: The FreeBSD shell converts this expression: git ${1:+-c push.default="$1"} push to this when "$1" is not empty: git "-c push.default=$1" push which causes git to fail. Hmph, just wh

Re: [PATCH] t5528: do not fail with FreeBSD shell

2015-03-08 Thread Jeff King
On Sun, Mar 08, 2015 at 08:37:50AM -0700, Kyle J. McKay wrote: > The FreeBSD shell converts this expression: > > git ${1:+-c push.default="$1"} push > > to this when "$1" is not empty: > > git "-c push.default=$1" push > > which causes git to fail. Hmph, just when I thought I knew about a

[PATCH] t5528: do not fail with FreeBSD shell

2015-03-08 Thread Kyle J. McKay
The FreeBSD shell converts this expression: git ${1:+-c push.default="$1"} push to this when "$1" is not empty: git "-c push.default=$1" push which causes git to fail. To avoid this we simply break up the expansion into two parts so that the whitespace which creates two arguments instead o