Skip to content

Commit 567c53d

Browse files
dschogitster
authored andcommitted
Allow the test suite to pass in a directory whose name contains spaces
It is totally legitimate to clone Git's source code anywhere, including into, say, directories whose name (or the name of its absolute path) contains spaces. However, a couple of tests failed to anticipate this, for lack of quoting (or in one instance, for failure to expect more than one space in the absolute path of the TEST_DIRECTORY). This can be easily verified by calling these commands in your current clone: git clone . with\ spaces cd with\ spaces make -j15 test Let's fix this. Signed-off-by: Johannes Schindelin <[email protected]> Reviewed-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 42e6fde commit 567c53d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

t/t7500-commit.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ EOF
130130
test_expect_success 'commit message from template with whitespace issue' '
131131
echo "content galore" >>foo &&
132132
git add foo &&
133-
GIT_EDITOR="$TEST_DIRECTORY"/t7500/add-whitespaced-content git commit \
134-
--template "$TEMPLATE" &&
133+
GIT_EDITOR=\""$TEST_DIRECTORY"\"/t7500/add-whitespaced-content \
134+
git commit --template "$TEMPLATE" &&
135135
commit_msg_is "commit message"
136136
'
137137

t/t9020-remote-svn.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ init_git () {
2525
git init &&
2626
#git remote add svnsim testsvn::sim:///$TEST_DIRECTORY/t9020/example.svnrdump
2727
# let's reuse an existing dump file!?
28-
git remote add svnsim testsvn::sim://$TEST_DIRECTORY/t9154/svn.dump
29-
git remote add svnfile testsvn::file://$TEST_DIRECTORY/t9154/svn.dump
28+
git remote add svnsim "testsvn::sim://$TEST_DIRECTORY/t9154/svn.dump"
29+
git remote add svnfile "testsvn::file://$TEST_DIRECTORY/t9154/svn.dump"
3030
}
3131

3232
if test -e "$GIT_BUILD_DIR/git-remote-testsvn"

t/t9107-git-svn-migrate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test_expect_success 'git-svn-HEAD is a real HEAD' '
2828
git rev-parse --verify refs/heads/git-svn-HEAD^0
2929
'
3030

31-
svnrepo_escaped=$(echo $svnrepo | sed 's/ /%20/')
31+
svnrepo_escaped=$(echo $svnrepo | sed 's/ /%20/g')
3232

3333
test_expect_success 'initialize old-style (v0) git svn layout' '
3434
mkdir -p "$GIT_DIR"/git-svn/info "$GIT_DIR"/svn/info &&

0 commit comments

Comments
 (0)