2008-07-27 08:15:51 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2010-11-02 16:31:20 +01:00
|
|
|
test_description='fetch follows remote-tracking branches correctly'
|
2008-07-27 08:15:51 +02:00
|
|
|
|
2022-04-13 22:01:48 +02:00
|
|
|
TEST_PASSES_SANITIZE_LEAK=true
|
2008-07-27 08:15:51 +02:00
|
|
|
. ./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
|