From: David Kastrup Date: Wed, 01 Aug 2007 23:58:14 GMT Subject: Re: [PATCH] git-sh-setup.sh: make GIT_EDITOR/core.editor/VISUAL/EDITOR accept commands Message-ID: <85sl72x0x5.fsf@lola.goethe.zz> In-Reply-To: <7vtzri3kpr.fsf@assigned-by-dhcp.cox.net> Junio C Hamano writes: > Junio C Hamano writes: > >> It is not just "won't apply". What if GIT_DIR had spaces (which >> is fine) and single-quotes in it? Wouldn't it percolate down to >> $@ because it becomes the leading directory of the temporary >> file name? And you quote '"$@"' and eval it, now what happens? > > Ah, I spoke too fast. It is fine --- the shell that actually is > doing the eval then interpolates "$@". Clever. Since eval folds all its arguments into a single string separated by single blanks, actual blanks (which can be multiple or interspersed with newlines) must not yet be seen. The string '"$@"' contains no blanks and thus gets through unmolested. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum