Re: [PATCH 1/3] cg-mv doesn't work with bash 3.1.7 due to excessive quotes

From: Pavel Roskin <proski@gnu.org>
Date: 2006-03-04 01:11:07
On Thu, 2006-03-02 at 21:27 -0800, Junio C Hamano wrote:
> Pavel Roskin <proski@gnu.org> writes:
> 
> > -	ARGS2["${#ARGS2[@]}"]="$_git_relpath${arg%/}"
> > +	ARGS2[${#ARGS2[@]}]="$_git_relpath${arg%/}"
> 
> Is this an application bug?  It looks like a workaround for a
> bug in the shell...

Indeed, bash 3.00.16 (FC4) is fine with the original cg-mv.  On the
other hand, bash 3.1.7 (FC development) doesn't even like this:

$ arg["0"]=0
bash: "0": syntax error: operand expected (error token is ""0"")

I don't see any relevant information in the NEWS file, so even if it's
no a bug, it's an undocumented feature :-)

Anyway, the quotes are excessive, bash is (sort of) correct to complain
about it, and I don't see any other instances of quoting array arguments
in cogito.

The quotes in question have always existed in cg-mv, they were not added
to work around anything.

-- 
Regards,
Pavel Roskin

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sat Mar 04 01:11:59 2006

This archive was generated by hypermail 2.1.8 : 2006-03-04 01:12:12 EST