X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft3200-branch.sh;h=2147eacc5057128facc08816a2980646bed28ec5;hb=a79b8b6623288f7d5409ad749cc6553976a4f0e8;hp=7c583c8055627d6f3c4a18bcce9c04005e0514d5;hpb=679639904da05f7d84e9215960e76dd0f3353328;p=git.git diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 7c583c805..2147eacc5 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -14,10 +14,10 @@ test_expect_success \ 'prepare a trivial repository' \ 'echo Hello > A && git update-index --add A && - git-commit -m "Initial commit." && + git commit -m "Initial commit." && echo World >> A && git update-index --add A && - git-commit -m "Second commit." && + git commit -m "Second commit." && HEAD=$(git rev-parse --verify HEAD)' test_expect_success \ @@ -123,7 +123,7 @@ test_expect_success \ test_expect_success 'test tracking setup via --track' \ 'git config remote.local.url . && git config remote.local.fetch refs/heads/*:refs/remotes/local/* && - (git show-ref -q refs/remotes/local/master || git-fetch local) && + (git show-ref -q refs/remotes/local/master || git fetch local) && git branch --track my1 local/master && test $(git config branch.my1.remote) = local && test $(git config branch.my1.merge) = refs/heads/master' @@ -131,7 +131,7 @@ test_expect_success 'test tracking setup via --track' \ test_expect_success 'test tracking setup (non-wildcard, matching)' \ 'git config remote.local.url . && git config remote.local.fetch refs/heads/master:refs/remotes/local/master && - (git show-ref -q refs/remotes/local/master || git-fetch local) && + (git show-ref -q refs/remotes/local/master || git fetch local) && git branch --track my4 local/master && test $(git config branch.my4.remote) = local && test $(git config branch.my4.merge) = refs/heads/master' @@ -139,7 +139,7 @@ test_expect_success 'test tracking setup (non-wildcard, matching)' \ test_expect_success 'test tracking setup (non-wildcard, not matching)' \ 'git config remote.local.url . && git config remote.local.fetch refs/heads/s:refs/remotes/local/s && - (git show-ref -q refs/remotes/local/master || git-fetch local) && + (git show-ref -q refs/remotes/local/master || git fetch local) && git branch --track my5 local/master && ! test "$(git config branch.my5.remote)" = local && ! test "$(git config branch.my5.merge)" = refs/heads/master' @@ -148,7 +148,7 @@ test_expect_success 'test tracking setup via config' \ 'git config branch.autosetupmerge true && git config remote.local.url . && git config remote.local.fetch refs/heads/*:refs/remotes/local/* && - (git show-ref -q refs/remotes/local/master || git-fetch local) && + (git show-ref -q refs/remotes/local/master || git fetch local) && git branch my3 local/master && test $(git config branch.my3.remote) = local && test $(git config branch.my3.merge) = refs/heads/master' @@ -157,7 +157,7 @@ test_expect_success 'test overriding tracking setup via --no-track' \ 'git config branch.autosetupmerge true && git config remote.local.url . && git config remote.local.fetch refs/heads/*:refs/remotes/local/* && - (git show-ref -q refs/remotes/local/master || git-fetch local) && + (git show-ref -q refs/remotes/local/master || git fetch local) && git branch --no-track my2 local/master && git config branch.autosetupmerge false && ! test "$(git config branch.my2.remote)" = local && @@ -173,7 +173,7 @@ test_expect_success 'no tracking without .fetch entries' \ test_expect_success 'test tracking setup via --track but deeper' \ 'git config remote.local.url . && git config remote.local.fetch refs/heads/*:refs/remotes/local/* && - (git show-ref -q refs/remotes/local/o/o || git-fetch local) && + (git show-ref -q refs/remotes/local/o/o || git fetch local) && git branch --track my7 local/o/o && test "$(git config branch.my7.remote)" = local && test "$(git config branch.my7.merge)" = refs/heads/o/o' @@ -200,7 +200,7 @@ test_expect_success \ test_expect_success \ 'branch from non-branch HEAD w/--track causes failure' \ - '!(git branch --track my10 HEAD^)' + 'test_must_fail git branch --track my10 HEAD^' # Keep this test last, as it changes the current branch cat >expect <