tvl-depot/third_party/git/t/t5513-fetch-track.sh
Vincent Ambo 7ef0d62730 merge(third_party/git): Merge squashed git subtree at v2.23.0
Merge commit '1b593e1ea4d2af0f6444d9a7788d5d99abd6fde5' as 'third_party/git'
2020-01-11 23:40:29 +00:00

30 lines
555 B
Bash
Executable file

#!/bin/sh
test_description='fetch follows remote-tracking branches correctly'
. ./test-lib.sh
test_expect_success setup '
>file &&
git add . &&
test_tick &&
git commit -m Initial &&
git branch b-0 &&
git branch b1 &&
git branch b/one &&
test_create_repo other &&
(
cd other &&
git config remote.origin.url .. &&
git config remote.origin.fetch "+refs/heads/b/*:refs/remotes/b/*"
)
'
test_expect_success fetch '
(
cd other && git fetch origin &&
test "$(git for-each-ref --format="%(refname)")" = refs/remotes/b/one
)
'
test_done