Merge branch 'tb/t5601-sed-fix' into maint
authorJunio C Hamano <gitster@pobox.com>
Thu, 26 May 2016 20:17:15 +0000 (13:17 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 May 2016 20:17:15 +0000 (13:17 -0700)
Test fix.

* tb/t5601-sed-fix:
t5601: Remove trailing space in sed expression

1  2 
t/t5601-clone.sh
diff --combined t/t5601-clone.sh
index c1efb8e445402cccdddda987e1eafad4d4bb75f9,cb5ad72efa48c5e11f44cb8da076a438a7fe8731..1789d0be3d2c7b1841d5203f7bc11e05651ad886
@@@ -4,9 -4,6 +4,9 @@@ test_description=clon
  
  . ./test-lib.sh
  
 +X=
 +test_have_prereq !MINGW || X=.exe
 +
  test_expect_success setup '
  
        rm -fr .git &&
@@@ -68,29 -65,6 +68,29 @@@ test_expect_success 'clone respects GIT
  
  '
  
 +test_expect_success 'clone from hooks' '
 +
 +      test_create_repo r0 &&
 +      cd r0 &&
 +      test_commit initial &&
 +      cd .. &&
 +      git init r1 &&
 +      cd r1 &&
 +      cat >.git/hooks/pre-commit <<-\EOF &&
 +      #!/bin/sh
 +      git clone ../r0 ../r2
 +      exit 1
 +      EOF
 +      chmod u+x .git/hooks/pre-commit &&
 +      : >file &&
 +      git add file &&
 +      test_must_fail git commit -m invoke-hook &&
 +      cd .. &&
 +      test_cmp r0/.git/HEAD r2/.git/HEAD &&
 +      test_cmp r0/initial.t r2/initial.t
 +
 +'
 +
  test_expect_success 'clone creates intermediate directories' '
  
        git clone src long/path/to/dst &&
@@@ -247,7 -221,7 +247,7 @@@ test_expect_success 'clone separate git
  '
  
  test_expect_success 'clone separate gitdir: output' '
 -      echo "gitdir: `pwd`/realgitdir" >expected &&
 +      echo "gitdir: $(pwd)/realgitdir" >expected &&
        test_cmp expected dst/.git
  '
  
@@@ -308,9 -282,14 +308,9 @@@ test_expect_success 'clone checking ou
  
  setup_ssh_wrapper () {
        test_expect_success 'setup ssh wrapper' '
 -              write_script "$TRASH_DIRECTORY/ssh-wrapper" <<-\EOF &&
 -              echo >>"$TRASH_DIRECTORY/ssh-output" "ssh: $*" &&
 -              # throw away all but the last argument, which should be the
 -              # command
 -              while test $# -gt 1; do shift; done
 -              eval "$1"
 -              EOF
 -              GIT_SSH="$TRASH_DIRECTORY/ssh-wrapper" &&
 +              cp "$GIT_BUILD_DIR/test-fake-ssh$X" \
 +                      "$TRASH_DIRECTORY/ssh-wrapper$X" &&
 +              GIT_SSH="$TRASH_DIRECTORY/ssh-wrapper$X" &&
                export GIT_SSH &&
                export TRASH_DIRECTORY &&
                >"$TRASH_DIRECTORY"/ssh-output
  }
  
  copy_ssh_wrapper_as () {
 -      cp "$TRASH_DIRECTORY/ssh-wrapper" "$1" &&
 -      GIT_SSH="$1" &&
 +      cp "$TRASH_DIRECTORY/ssh-wrapper$X" "${1%$X}$X" &&
 +      GIT_SSH="${1%$X}$X" &&
        export GIT_SSH
  }
  
@@@ -466,7 -445,7 +466,7 @@@ test_expect_success 'clone ssh://host.x
  #IPv6
  for tuah in ::1 [::1] [::1]: user@::1 user@[::1] user@[::1]: [user@::1] [user@::1]:
  do
-       ehost=$(echo $tuah | sed -e "s/1]:/1]/ "| tr -d "[]")
+       ehost=$(echo $tuah | sed -e "s/1]:/1]/| tr -d "[]")
        test_expect_success "clone ssh://$tuah/home/user/repo" "
          test_clone_url ssh://$tuah/home/user/repo $ehost /home/user/repo
        "
@@@ -517,11 -496,4 +517,11 @@@ test_expect_success 'shallow clone loca
        ( cd ddsstt && git fsck )
  '
  
 +test_expect_success 'GIT_TRACE_PACKFILE produces a usable pack' '
 +      rm -rf dst.git &&
 +      GIT_TRACE_PACKFILE=$PWD/tmp.pack git clone --no-local --bare src dst.git &&
 +      git init --bare replay.git &&
 +      git -C replay.git index-pack -v --stdin <tmp.pack
 +'
 +
  test_done