Subject: Re: [PATCH 3/3] meson: wire up gitk and git-gui

From: Patrick Steinhardt <[email-masked]>
Date: Sun, 24 Aug 2025 19:25:09 +0200

On Tue, Aug 19, 2025 at 02:40:55AM -0700, Karthik Nayak wrote:
> Patrick Steinhardt <[email-masked]> writes:
> > diff --git a/meson.build b/meson.build
> > index 5dd299b496..edf7b69a00 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -2207,6 +2209,16 @@ configure_file(
> >    configuration: build_options_config,
> >  )
> >
> > +gitk_option = get_option('gitk').disable_auto_if(not wish.found())
> 
> Since 'wish' is defined as required above when 'gitk' is enabled, would
> it even come here if there is no 'wish'?

Yeah, it can happen. We're checking for `enabled()`, not `allowed()`.
This means that we only require "wish" in case the user has explicitly
asked us to enable gitk or git-gui. Otherwise, if the user has "auto"
configured for these we may end up finding one, but not both of these
commands. So we do have to auto-disable the feature in that case.

Patrick