fetch: stop passing around unused worktrees variable
commitb2463fc30a43a43b5de788fa1611603f84097873
authorJeff King <peff@peff.net>
Sun, 19 Jun 2022 03:53:19 +0000 (18 23:53 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Jun 2022 15:52:32 +0000 (21 08:52 -0700)
tree2e8a684eb1d6d656414b69ca69b2c484525e7d0c
parent4b6e18f5a06f54d78e24a13a29d7a6b753f793a4
fetch: stop passing around unused worktrees variable

In 12d47e3b1f (fetch: use new branch_checked_out() and add tests,
2022-06-14), fetch's update_local_ref() function stopped using its
"worktrees" parameter. It doesn't need it, since the
branch_checked_out() function examines the global worktrees under the
hood.

So we can not only drop the unused parameter from that function, but
also from its entire call chain. And as we do so all the way up to
do_fetch(), we can see that nobody uses it at all, and we can drop the
local variable there entirely.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c