Merge branch 'js/perl-path-workaround-in-tests'
authorJunio C Hamano <gitster@pobox.com>
Wed, 10 Jan 2018 22:01:31 +0000 (14:01 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 10 Jan 2018 22:01:31 +0000 (14:01 -0800)
* js/perl-path-workaround-in-tests:
mingw: handle GITPERLLIB in t0021 in a Windows-compatible way

26 files changed:
.travis.yml
Documentation/SubmittingPatches
Documentation/diff-options.txt
Makefile
bisect.c
ci/lib-travisci.sh
ci/print-test-failures.sh
ci/run-linux32-build.sh
ci/run-linux32-docker.sh
ci/run-static-analysis.sh
ci/run-tests.sh
ci/run-windows-build.sh
ci/test-documentation.sh
configure.ac
git-gui/git-gui.sh
git-gui/lib/diff.tcl
git-rebase--interactive.sh
merge-recursive.c
t/lib-httpd/apache.conf
t/t0302-credential-store.sh
t/t3030-merge-recursive.sh
t/t3418-rebase-continue.sh
t/t3900-i18n-commit.sh
t/t7500-commit.sh
t/t9020-remote-svn.sh
t/t9107-git-svn-migrate.sh
index 7c9aa0557eccad0f04885ba97646d3111d0d4b27..4684b3f4f30f78d5f1d5d0f7eb5bfea9b81861ba 100644 (file)
@@ -42,6 +42,7 @@ matrix:
     - env: jobname=Linux32
       os: linux
       compiler:
+      addons:
       services:
         - docker
       before_install:
index 3ef30922ecdce94c84c5e9df33f6696622ab4844..a1d0feca36fea36b84b587c1387eab53e3b870c6 100644 (file)
@@ -261,7 +261,7 @@ not a text/plain, it's something else.
 
 Send your patch with "To:" set to the mailing list, with "cc:" listing
 people who are involved in the area you are touching (the output from
-+git blame _$path_+ and +git shortlog {litdd}no-merges _$path_+ would help to
+`git blame $path` and `git shortlog --no-merges $path` would help to
 identify them), to solicit comments and reviews.
 
 :1: footnote:[The current maintainer: gitster@pobox.com]
index 9d1586b95659befe40d77201c7da88906b9b8b02..743af97b06153813820264bb6cf9085f50b6696f 100644 (file)
@@ -469,6 +469,12 @@ ifndef::git-format-patch[]
 +
 Also, these upper-case letters can be downcased to exclude.  E.g.
 `--diff-filter=ad` excludes added and deleted paths.
++
+Note that not all diffs can feature all types. For instance, diffs
+from the index to the working tree can never have Added entries
+(because the set of paths included in the diff is limited by what is in
+the index).  Similarly, copied and renamed entries cannot appear if
+detection for those types is disabled.
 
 -S<string>::
        Look for differences that change the number of occurrences of
index bb5b7cdfb695ee7f15128d5885ea74a4e34f5b9b..1a9b23b6793f91072760affefac3851ca457a2f5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,6 @@ all::
 # it at all).
 #
 # Define NO_OPENSSL environment variable if you do not have OpenSSL.
-# This also implies BLK_SHA1.
 #
 # Define USE_LIBPCRE if you have and want to use libpcre. Various
 # commands such as log and grep offer runtime options to use
@@ -1275,7 +1274,6 @@ ifndef NO_OPENSSL
        endif
 else
        BASIC_CFLAGS += -DNO_OPENSSL
-       BLK_SHA1 = 1
        OPENSSL_LIBSSL =
 endif
 ifdef NO_OPENSSL
index 0fca17c02bba89d6c65df95e03e88ef6dd02971e..2f3008b07866fb7bda6c0e0bbb089b1be1271a1a 100644 (file)
--- a/bisect.c
+++ b/bisect.c
@@ -229,8 +229,10 @@ static struct commit_list *best_bisection_sorted(struct commit_list *list, int n
                if (i < cnt - 1)
                        p = p->next;
        }
-       free_commit_list(p->next);
-       p->next = NULL;
+       if (p) {
+               free_commit_list(p->next);
+               p->next = NULL;
+       }
        strbuf_release(&buf);
        free(array);
        return list;
index 331d3eb3a6914cd811448e002e8b10ed503e7263..07f27c72700702e745eb0a9d1f9b9aa8ec549f4f 100755 (executable)
@@ -16,16 +16,77 @@ skip_branch_tip_with_tag () {
        if TAG=$(git describe --exact-match "$TRAVIS_BRANCH" 2>/dev/null) &&
                test "$TAG" != "$TRAVIS_BRANCH"
        then
-               echo "Tip of $TRAVIS_BRANCH is exactly at $TAG"
+               echo "$(tput setaf 2)Tip of $TRAVIS_BRANCH is exactly at $TAG$(tput sgr0)"
                exit 0
        fi
 }
 
+good_trees_file="$HOME/travis-cache/good-trees"
+
+# Save some info about the current commit's tree, so we can skip the build
+# job if we encounter the same tree again and can provide a useful info
+# message.
+save_good_tree () {
+       echo "$(git rev-parse $TRAVIS_COMMIT^{tree}) $TRAVIS_COMMIT $TRAVIS_JOB_NUMBER $TRAVIS_JOB_ID" >>"$good_trees_file"
+       # limit the file size
+       tail -1000 "$good_trees_file" >"$good_trees_file".tmp
+       mv "$good_trees_file".tmp "$good_trees_file"
+}
+
+# Skip the build job if the same tree has already been built and tested
+# successfully before (e.g. because the branch got rebased, changing only
+# the commit messages).
+skip_good_tree () {
+       if ! good_tree_info="$(grep "^$(git rev-parse $TRAVIS_COMMIT^{tree}) " "$good_trees_file")"
+       then
+               # Haven't seen this tree yet, or no cached good trees file yet.
+               # Continue the build job.
+               return
+       fi
+
+       echo "$good_tree_info" | {
+               read tree prev_good_commit prev_good_job_number prev_good_job_id
+
+               if test "$TRAVIS_JOB_ID" = "$prev_good_job_id"
+               then
+                       cat <<-EOF
+                       $(tput setaf 2)Skipping build job for commit $TRAVIS_COMMIT.$(tput sgr0)
+                       This commit has already been built and tested successfully by this build job.
+                       To force a re-build delete the branch's cache and then hit 'Restart job'.
+                       EOF
+               else
+                       cat <<-EOF
+                       $(tput setaf 2)Skipping build job for commit $TRAVIS_COMMIT.$(tput sgr0)
+                       This commit's tree has already been built and tested successfully in build job $prev_good_job_number for commit $prev_good_commit.
+                       The log of that build job is available at https://travis-ci.org/$TRAVIS_REPO_SLUG/jobs/$prev_good_job_id
+                       To force a re-build delete the branch's cache and then hit 'Restart job'.
+                       EOF
+               fi
+       }
+
+       exit 0
+}
+
+check_unignored_build_artifacts ()
+{
+       ! git ls-files --other --exclude-standard --error-unmatch \
+               -- ':/*' 2>/dev/null ||
+       {
+               echo "$(tput setaf 1)error: found unignored build artifacts$(tput sgr0)"
+               false
+       }
+}
+
 # Set 'exit on error' for all CI scripts to let the caller know that
-# something went wrong
+# something went wrong.
+# Set tracing executed commands, primarily setting environment variables
+# and installing dependencies.
 set -ex
 
+mkdir -p "$HOME/travis-cache"
+
 skip_branch_tip_with_tag
+skip_good_tree
 
 if test -z "$jobname"
 then
@@ -48,8 +109,8 @@ linux-clang|linux-gcc)
        export LINUX_P4_VERSION="16.2"
        export LINUX_GIT_LFS_VERSION="1.5.2"
 
-       P4_PATH="$(pwd)/custom/p4"
-       GIT_LFS_PATH="$(pwd)/custom/git-lfs"
+       P4_PATH="$HOME/custom/p4"
+       GIT_LFS_PATH="$HOME/custom/git-lfs"
        export PATH="$GIT_LFS_PATH:$P4_PATH:$PATH"
        ;;
 osx-clang|osx-gcc)
index 8c8973cbf365ed18c1a20b81ec2bcd4a873f62b7..4f261ddc012fb162b7d414b065fe251ceff91bee 100755 (executable)
@@ -5,6 +5,15 @@
 
 . ${0%/*}/lib-travisci.sh
 
+# Tracing executed commands would produce too much noise in the loop below.
+set +x
+
+if ! ls t/test-results/*.exit >/dev/null 2>/dev/null
+then
+       echo "Build job failed before the tests could have been run"
+       exit
+fi
+
 for TEST_EXIT in t/test-results/*.exit
 do
        if [ "$(cat "$TEST_EXIT")" != "0" ]
index e30fb2cddcb59821a90a5c77496664b9a3609113..c19c50c1c9a57c14c07ffe4f5a061bb764e51aeb 100755 (executable)
@@ -6,6 +6,8 @@
 #   run-linux32-build.sh [host-user-id]
 #
 
+set -x
+
 # Update packages to the latest available versions
 linux32 --32bit i386 sh -c '
     apt update >/dev/null &&
@@ -25,6 +27,7 @@ test -z $HOST_UID || (CI_USER="ci" && useradd -u $HOST_UID $CI_USER) &&
 # Build and test
 linux32 --32bit i386 su -m -l $CI_USER -c '
     cd /usr/src/git &&
+    ln -s /tmp/travis-cache/.prove t/.prove &&
     make --jobs=2 &&
     make --quiet test
 '
index 0edf63acfafb77a061cde1225ae3543173a37cd7..4f191c5bb12185251f98a2d54422640cb19b8be1 100755 (executable)
@@ -19,5 +19,10 @@ docker run \
        --env GIT_TEST_OPTS \
        --env GIT_TEST_CLONE_2GB \
        --volume "${PWD}:/usr/src/git" \
+       --volume "${HOME}/travis-cache:/tmp/travis-cache" \
        daald/ubuntu32:xenial \
        /usr/src/git/ci/run-linux32-build.sh $(id -u $USER)
+
+check_unignored_build_artifacts
+
+save_good_tree
index 68dd0f080e88983a1be250ed2e4c9f9d8cf144f2..fe4ee4e06b1e33d3ee1cd9022df06c960dd8d75b 100755 (executable)
@@ -6,3 +6,5 @@
 . ${0%/*}/lib-travisci.sh
 
 make coccicheck
+
+save_good_tree
index f0c743de948d282f3259fcf22b19fd84e15dcf42..22355f0091a0a3936472179249cf152d9f20fc17 100755 (executable)
@@ -5,6 +5,9 @@
 
 . ${0%/*}/lib-travisci.sh
 
-mkdir -p $HOME/travis-cache
 ln -s $HOME/travis-cache/.prove t/.prove
 make --quiet test
+
+check_unignored_build_artifacts
+
+save_good_tree
index 8757b3a97c5d7598bfdb2ec1f42cbb6851bae448..d99a180e528084a43dff3f640ad3036f4f9dbf07 100755 (executable)
@@ -69,6 +69,10 @@ esac
 
 echo "Visual Studio Team Services Build #${BUILD_ID}"
 
+# Tracing execued commands would produce too much noise in the waiting
+# loop below.
+set +x
+
 # Wait until build job finished
 STATUS=
 RESULT=
@@ -90,7 +94,10 @@ done
 # Print log
 echo ""
 echo ""
+set -x
 gfwci "action=log&buildId=$BUILD_ID" | cut -c 30-
 
 # Set exit code for TravisCI
 test "$RESULT" = "success"
+
+save_good_tree
index 7a0a848e83d68152acaa1de50fd7fb5fe9990151..a20de9ca127f82ba916534dfb12f3932595dda05 100755 (executable)
@@ -18,6 +18,9 @@ test -s Documentation/git.xml
 test -s Documentation/git.1
 grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html
 
+rm -f stdout.log stderr.log
+check_unignored_build_artifacts
+
 # Build docs with AsciiDoctor
 make clean
 make --jobs=2 USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.log >&2)
@@ -25,3 +28,8 @@ sed '/^GIT_VERSION = / d' stderr.log
 ! test -s stderr.log
 test -s Documentation/git.html
 grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html
+
+rm -f stdout.log stderr.log
+check_unignored_build_artifacts
+
+save_good_tree
index 2f55237e65acfcf9b7fed15ac0386d353eaf0105..7f8415140f309e0522310fac3160b5a01cefc7cd 100644 (file)
@@ -241,7 +241,6 @@ AC_MSG_NOTICE([CHECKS for site configuration])
 # a bundled SHA1 routine optimized for PowerPC.
 #
 # Define NO_OPENSSL environment variable if you do not have OpenSSL.
-# This also implies BLK_SHA1.
 #
 # Define OPENSSLDIR=/foo/bar if your openssl header and library files are in
 # /foo/bar/include and /foo/bar/lib directories.
index ed24aa9d2f16a4eb600fc3298ebeb931f9fb6c9c..91c00e6489305a56faed6d4e89150709ba7f2aeb 100755 (executable)
@@ -2501,9 +2501,28 @@ proc toggle_or_diff {mode w args} {
                set pos [split [$w index @$x,$y] .]
                foreach {lno col} $pos break
        } else {
+               if {$mode eq "toggle"} {
+                       if {$w eq $ui_workdir} {
+                               do_add_selection
+                               set last_clicked {}
+                               return
+                       }
+                       if {$w eq $ui_index} {
+                               do_unstage_selection
+                               set last_clicked {}
+                               return
+                       }
+               }
+
                if {$last_clicked ne {}} {
                        set lno [lindex $last_clicked 1]
                } else {
+                       if {![info exists file_lists]
+                               || ![info exists file_lists($w)]
+                               || [llength $file_lists($w)] == 0} {
+                               set last_clicked {}
+                               return
+                       }
                        set lno [expr {int([lindex [$w tag ranges in_diff] 0])}]
                }
                if {$mode eq "toggle"} {
@@ -2514,7 +2533,13 @@ proc toggle_or_diff {mode w args} {
                }
        }
 
-       set path [lindex $file_lists($w) [expr {$lno - 1}]]
+       if {![info exists file_lists]
+               || ![info exists file_lists($w)]
+               || [llength $file_lists($w)] < $lno - 1} {
+               set path {}
+       } else {
+               set path [lindex $file_lists($w) [expr {$lno - 1}]]
+       }
        if {$path eq {}} {
                set last_clicked {}
                return
index 4cae10a4c7f197aab9ae0bc145254a8d4a1bae50..68c4a6c7366f864bcfc500483c83b15860a2d185 100644 (file)
@@ -698,6 +698,7 @@ proc apply_range_or_line {x y} {
                set hh [$ui_diff get $i_l "$i_l + 1 lines"]
                set hh [lindex [split $hh ,] 0]
                set hln [lindex [split $hh -] 1]
+               set hln [lindex [split $hln " "] 0]
 
                # There is a special situation to take care of. Consider this
                # hunk:
index b7f95672bd90ba04564e1446c97be887645706de..d47bd29593ad8711448293f3b6bf2e059323ff78 100644 (file)
@@ -392,9 +392,12 @@ pick_one_preserving_merges () {
                        new_parents=${new_parents# $first_parent}
                        merge_args="--no-log --no-ff"
                        if ! do_with_author output eval \
-                       'git merge ${gpg_sign_opt:+"$gpg_sign_opt"} \
-                               $allow_rerere_autoupdate $merge_args \
-                               $strategy_args -m "$msg_content" $new_parents'
+                               git merge ${gpg_sign_opt:+$(git rev-parse \
+                                       --sq-quote "$gpg_sign_opt")} \
+                               $allow_rerere_autoupdate "$merge_args" \
+                               "$strategy_args" \
+                               -m $(git rev-parse --sq-quote "$msg_content") \
+                               "$new_parents"
                        then
                                printf "%s\n" "$msg_content" > "$GIT_DIR"/MERGE_MSG
                                die_with_patch $sha1 "$(eval_gettext "Error redoing merge \$sha1")"
index 780f81a8bd3a729502cf2211a63135e4fba5d6cf..0fc580d8ca97c77d436f3351993300d19acd1ccc 100644 (file)
@@ -1954,7 +1954,7 @@ int merge_trees(struct merge_options *o,
        if (oid_eq(&common->object.oid, &merge->object.oid)) {
                struct strbuf sb = STRBUF_INIT;
 
-               if (index_has_changes(&sb)) {
+               if (!o->call_depth && index_has_changes(&sb)) {
                        err(o, _("Dirty index: cannot merge (dirty: %s)"),
                            sb.buf);
                        return 0;
index df19436314b7c6d16833044c5c53ba90eae62225..724d9ae462b78af95298786a1fe26f375023ad55 100644 (file)
@@ -25,6 +25,9 @@ ErrorLog error.log
 <IfModule !mod_headers.c>
        LoadModule headers_module modules/mod_headers.so
 </IfModule>
+<IfModule !mod_setenvif.c>
+       LoadModule setenvif_module modules/mod_setenvif.so
+</IfModule>
 
 <IfVersion < 2.4>
 LockFile accept.lock
@@ -67,9 +70,6 @@ LockFile accept.lock
 <IfModule !mod_unixd.c>
        LoadModule unixd_module modules/mod_unixd.so
 </IfModule>
-<IfModule !mod_setenvif.c>
-       LoadModule setenvif_module modules/mod_setenvif.so
-</IfModule>
 </IfVersion>
 
 PassEnv GIT_VALGRIND
@@ -79,9 +79,7 @@ PassEnv ASAN_OPTIONS
 PassEnv GIT_TRACE
 PassEnv GIT_CONFIG_NOSYSTEM
 
-<IfVersion >= 2.4>
-       SetEnvIf Git-Protocol ".*" GIT_PROTOCOL=$0
-</IfVersion>
+SetEnvIf Git-Protocol ".*" GIT_PROTOCOL=$0
 
 Alias /dumb/ www/
 Alias /auth/dumb/ www/auth/dumb/
index 1d8d1f210b99e888fa39da14f73aef19eaf338b5..d6b54e8c65a3ec4408fe07ee76a6d8bed957207a 100755 (executable)
@@ -37,7 +37,7 @@ helper_test store
 unset XDG_CONFIG_HOME
 
 test_expect_success 'if custom xdg file exists, home and xdg files not created' '
-       test_when_finished "rm -f $HOME/xdg/git/credentials" &&
+       test_when_finished "rm -f \"$HOME/xdg/git/credentials\"" &&
        test -s "$HOME/xdg/git/credentials" &&
        test_path_is_missing "$HOME/.git-credentials" &&
        test_path_is_missing "$HOME/.config/git/credentials"
index 9a893b5fe746f03521454972199ecb2d243d79ab..cdc38fe5d1a0d171aa3cdf9ac8ee73dd2cd3b18d 100755 (executable)
@@ -678,4 +678,54 @@ test_expect_success 'merge-recursive remembers the names of all base trees' '
        test_cmp expect actual
 '
 
+test_expect_success 'merge-recursive internal merge resolves to the sameness' '
+       git reset --hard HEAD &&
+
+       # We are going to create a history leading to two criss-cross
+       # branches A and B.  The common ancestor at the bottom, O0,
+       # has two child commits O1 and O2, both of which will be merge
+       # base between A and B, like so:
+       #
+       #       O1---A
+       #      /  \ /
+       #    O0    .
+       #      \  / \
+       #       O2---B
+       #
+       # The recently added "check to see if the index is different from
+       # the tree into which something else is getting merged" check must
+       # NOT kick in when an inner merge between O1 and O2 is made.  Both
+       # O1 and O2 happen to have the same tree as O0 in this test to
+       # trigger the bug---whether the inner merge is made by merging O2
+       # into O1 or O1 into O2, their common ancestor O0 and the branch
+       # being merged have the same tree.  We should not trigger the "is
+       # the index dirty?" check in this case.
+
+       echo "zero" >file &&
+       git add file &&
+       test_tick &&
+       git commit -m "O0" &&
+       O0=$(git rev-parse HEAD) &&
+
+       test_tick &&
+       git commit --allow-empty -m "O1" &&
+       O1=$(git rev-parse HEAD) &&
+
+       git reset --hard $O0 &&
+       test_tick &&
+       git commit --allow-empty -m "O2" &&
+       O2=$(git rev-parse HEAD) &&
+
+       test_tick &&
+       git merge -s ours $O1 &&
+       B=$(git rev-parse HEAD) &&
+
+       git reset --hard $O1 &&
+       test_tick &&
+       git merge -s ours $O2 &&
+       A=$(git rev-parse HEAD) &&
+
+       git merge $B
+'
+
 test_done
index fcfdd197bd352a9dca10233c2ba6d2aa4a66149e..7c91a85f43a7a11295819adc5da5f8e5fca9e4ea 100755 (executable)
@@ -74,6 +74,20 @@ test_expect_success 'rebase --continue remembers merge strategy and options' '
        test -f funny.was.run
 '
 
+test_expect_success 'rebase passes merge strategy options correctly' '
+       rm -fr .git/rebase-* &&
+       git reset --hard commit-new-file-F3-on-topic-branch &&
+       test_commit theirs-to-merge &&
+       git reset --hard HEAD^ &&
+       test_commit some-commit &&
+       test_tick &&
+       git merge --no-ff theirs-to-merge &&
+       FAKE_LINES="1 edit 2 3" git rebase -i -f -p -m \
+               -s recursive --strategy-option=theirs HEAD~2 &&
+       test_commit force-change &&
+       git rebase --continue
+'
+
 test_expect_success 'setup rerere database' '
        rm -fr .git/rebase-* &&
        git reset --hard commit-new-file-F3-on-topic-branch &&
index 3b94283e35535ea4c594e3e746bd01a095eba4e7..9e4e694d939b217d2f0e308d7b4a3a735c9751ce 100755 (executable)
@@ -40,7 +40,7 @@ test_expect_success 'UTF-16 refused because of NULs' '
 '
 
 test_expect_success 'UTF-8 invalid characters refused' '
-       test_when_finished "rm -f $HOME/stderr $HOME/invalid" &&
+       test_when_finished "rm -f \"$HOME/stderr $HOME/invalid\"" &&
        echo "UTF-8 characters" >F &&
        printf "Commit message\n\nInvalid surrogate:\355\240\200\n" \
                >"$HOME/invalid" &&
@@ -49,7 +49,7 @@ test_expect_success 'UTF-8 invalid characters refused' '
 '
 
 test_expect_success 'UTF-8 overlong sequences rejected' '
-       test_when_finished "rm -f $HOME/stderr $HOME/invalid" &&
+       test_when_finished "rm -f \"$HOME/stderr $HOME/invalid\"" &&
        rm -f "$HOME/stderr" "$HOME/invalid" &&
        echo "UTF-8 overlong" >F &&
        printf "\340\202\251ommit message\n\nThis is not a space:\300\240\n" \
@@ -59,7 +59,7 @@ test_expect_success 'UTF-8 overlong sequences rejected' '
 '
 
 test_expect_success 'UTF-8 non-characters refused' '
-       test_when_finished "rm -f $HOME/stderr $HOME/invalid" &&
+       test_when_finished "rm -f \"$HOME/stderr $HOME/invalid\"" &&
        echo "UTF-8 non-character 1" >F &&
        printf "Commit message\n\nNon-character:\364\217\277\276\n" \
                >"$HOME/invalid" &&
@@ -68,7 +68,7 @@ test_expect_success 'UTF-8 non-characters refused' '
 '
 
 test_expect_success 'UTF-8 non-characters refused' '
-       test_when_finished "rm -f $HOME/stderr $HOME/invalid" &&
+       test_when_finished "rm -f \"$HOME/stderr $HOME/invalid\"" &&
        echo "UTF-8 non-character 2." >F &&
        printf "Commit message\n\nNon-character:\357\267\220\n" \
                >"$HOME/invalid" &&
index 5739d3ed232268331517d59600d1e72b625360d2..1d33c5feb3e23744a5709e2f9bf429d23f49101f 100755 (executable)
@@ -130,8 +130,8 @@ EOF
 test_expect_success 'commit message from template with whitespace issue' '
        echo "content galore" >>foo &&
        git add foo &&
-       GIT_EDITOR="$TEST_DIRECTORY"/t7500/add-whitespaced-content git commit \
-               --template "$TEMPLATE" &&
+       GIT_EDITOR=\""$TEST_DIRECTORY"\"/t7500/add-whitespaced-content \
+       git commit --template "$TEMPLATE" &&
        commit_msg_is "commit message"
 '
 
index 4d81ba1c2c43bfe14cb329967ccf2c97b90a4848..6fca08e5e35bd35cab5b97654b4a852ac28c9a34 100755 (executable)
@@ -25,8 +25,8 @@ init_git () {
        git init &&
        #git remote add svnsim testsvn::sim:///$TEST_DIRECTORY/t9020/example.svnrdump
        # let's reuse an existing dump file!?
-       git remote add svnsim testsvn::sim://$TEST_DIRECTORY/t9154/svn.dump
-       git remote add svnfile testsvn::file://$TEST_DIRECTORY/t9154/svn.dump
+       git remote add svnsim "testsvn::sim://$TEST_DIRECTORY/t9154/svn.dump"
+       git remote add svnfile "testsvn::file://$TEST_DIRECTORY/t9154/svn.dump"
 }
 
 if test -e "$GIT_BUILD_DIR/git-remote-testsvn"
index 9f3ef8f2ef614814887f94b7f53e4a7e96f6bbcf..ceaa5bad105e52eca3d193255766548e41d84f31 100755 (executable)
@@ -28,7 +28,7 @@ test_expect_success 'git-svn-HEAD is a real HEAD' '
        git rev-parse --verify refs/heads/git-svn-HEAD^0
 '
 
-svnrepo_escaped=$(echo $svnrepo | sed 's/ /%20/')
+svnrepo_escaped=$(echo $svnrepo | sed 's/ /%20/g')
 
 test_expect_success 'initialize old-style (v0) git svn layout' '
        mkdir -p "$GIT_DIR"/git-svn/info "$GIT_DIR"/svn/info &&