Re: [PATCH 8/8] Fix tests breaking when checkout path contains shell metacharacters
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 10, 2008, 07:24 UTC
- Message-ID
- <7vwsn6xjde.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <47FDB85F.9070503@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
Show 19 quoted lines
>>>> test_expect_success ".rev_db auto-converted to .rev_map.UUID" " >>>> git-svn fetch -i trunk && >>>> + test -z \"\$(ls \"\$GIT_DIR\"/svn/trunk/.rev_db.* 2>/dev/null)\" && >>>> + expect=\"\$(ls \"\$GIT_DIR\"/svn/trunk/.rev_map.*)\" && >>>> test -n \"\$expect\" && >>>> + rev_db=\"\$(echo \$expect | sed -e 's,_map,_db,')\" && >>>> + convert_to_rev_db \"\$expect\" \"\$rev_db\" && >>>> + rm -f \"\$expect\" && >>>> + test -f \"\$rev_db\" && >>>> git-svn fetch -i trunk && >>>> + test -z \"\$(ls \"\$GIT_DIR\"/svn/trunk/.rev_db.* 2>/dev/null)\" && >>>> + test ! -e \"\$GIT_DIR\"/svn/trunk/.rev_db && >>>> + test -f \"\$expect\" >>>> " >>> While looking at this test: Wouldn't it be easier to just place the whole >>> thing (and probably similar cases, too) in single-quotes? >> >> To be honest, I fixed all the git-svn tests with a suitably clever vim s/// >> expression, so at the time this way was actually easier :)
Yeah, last night I ran out of energy reviewing things. The above is simply too ugly to be acceptable, with or without automated s/// expression.