[PATCH v3 1/8] t5710: simplify 'mkdir X' followed by 'git -C X init'
- From
Christian Couder <christian.couder@gmail.com>
- Date
- May 19, 2026, 15:38 UTC
- Message-ID
- <20260519153808.494105-2-christian.couder@gmail.com>
- In-Reply-To
- <20260519153808.494105-1-christian.couder@gmail.com>
It's simpler and more efficient to just use `git init client` instead of `mkdir client && git -C client init`.
So let's replace the latter with the former.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> --- t/t5710-promisor-remote-capability.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/t/t5710-promisor-remote-capability.sh b/t/t5710-promisor-remote-capability.sh index b404ad9f0a..bf1cc54605 100755 --- a/t/t5710-promisor-remote-capability.sh +++ b/t/t5710-promisor-remote-capability.sh @@ -177,8 +177,7 @@ test_expect_success "init + fetch with promisor.advertise set to 'true'" ' git -C server config promisor.advertise true && test_when_finished "rm -rf client" && - mkdir client && - git -C client init && + git init client && git -C client config remote.lop.promisor true && git -C client config remote.lop.fetch "+refs/heads/*:refs/remotes/lop/*" && git -C client config remote.lop.url "$TRASH_DIRECTORY_URL/lop" && @@ -231,8 +230,7 @@ test_expect_success "init + fetch two promisors but only one advertised" ' # Create a promisor that will be configured but not be used git init --bare unused_lop && - mkdir client && - git -C client init && + git init client && git -C client config remote.unused_lop.promisor true && git -C client config remote.unused_lop.fetch "+refs/heads/*:refs/remotes/unused_lop/*" && git -C client config remote.unused_lop.url "$TRASH_DIRECTORY_URL/unused_lop" &&
-- 2.54.0.134.gbbe8e27878.dirty