From: Patrick Steinhardt Date: Mon, 20 Apr 2026 07:06:30 GMT Subject: Re: [PATCH 10/18] setup: stop using `the_repository` in `set_git_work_tree()` Message-ID: In-Reply-To: On Fri, Apr 17, 2026 at 06:16:30PM -0700, Elijah Newren wrote: > On Mon, Mar 30, 2026 at 6:19 AM Patrick Steinhardt wrote: > > diff --git a/repository.h b/repository.h > > index abeef3129e..7ae3d34484 100644 > > --- a/repository.h > > +++ b/repository.h > [...] > > + bool worktree_initialized; > > diff --git a/setup.c b/setup.c > [...] > > > > -static int git_work_tree_initialized; > > Okay, so we replaced the global git_work_tree_intialized with a > repository field named worktree_initialized, _and_ changed its type > from int to bool... > > > - git_work_tree_initialized = 1; > > - repo_set_worktree(the_repository, new_work_tree); > > + repo->worktree_initialized = 1; > > + repo_set_worktree(repo, new_work_tree); > > ...yet we still set it to "1". Shouldn't we initialize it to "true" > given the typechange? Good point, will fix. Patrick