mirror of
https://github.com/git-for-windows/git.git
synced 2026-04-20 17:54:13 -05:00
Stop using `the_repository` in `setup_work_tree()` and instead accept the repository as a parameter. The injection of `the_repository` is thus bumped one level higher, where callers now pass it in explicitly. Note that the function tracks bogus worktree configuration via a global variable. If we have bogus configuration, and if later on some caller tries to setup a worktree, then we'll die instead. Of course, tracking this as a global variable doesn't make sense anymore now that we can set up worktrees for arbitrary repositories. Move the variable into `struct repository` instead. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2.2 KiB
2.2 KiB