Re: [RFC][PATCH 2/2] worktree: stop passing NULL as primary worktree
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 17, 2026, 05:21 UTC
- Message-ID
- <xmqqldgsdjy2.fsf@gitster.g>
- In-Reply-To
- <66b0f03a-36ab-4305-814e-6d964f5d33c4@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
> It might be worth adding the current worktree (or probably the worktree > that the struct repository refers to) to struct repository in the future > but I think that is outside the scope of cleaning up wt-status.c
Thanks for being conservative. I would agree that we would need further thought before making such a change, and if we do not need it if we have "give me the current worktree struct" call to clean up the wt-status.c where passing NULL to indicate the "current" is problematic.