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

From: Patrick Steinhardt <[email-masked]>
Date: Thu, 5 Feb 2026 12:55:04 +0100

On Thu, Feb 05, 2026 at 04:37:48AM -0500, Jeff King wrote:
> On Wed, Feb 04, 2026 at 09:38:11AM +0100, Patrick Steinhardt wrote:
> 
> > Wire up both gitk and git-gui in Meson as subprojects. These two
> > programs should be the last missing pieces for feature compatibility
> > with our Makefile for distributors.
> > 
> > Note that Meson expects subprojects to live in the "subprojects/"
> > directory. Create symlinks to fulfill this requirement.
> 
> The GitHub Actions win+Meson job fails for 'jch' with:
> 
>   Project name: gitk
>   Project version: undefined
>   Program sh found: YES (C:\Program Files\Git\bin\sh.EXE)
>   Program wish found: YES (C:\Program Files\Git\mingw64\bin\wish.EXE)
>   Program chmod found: YES (C:\Program Files\Git\usr\bin\chmod.EXE)
>   Program mv found: YES (C:\Program Files\Git\usr\bin\mv.EXE)
>   Program sed found: YES (C:\Program Files\Git\usr\bin\sed.EXE)
>   Program msgfmt found: NO
> 
>   subprojects\gitk\meson.build:28:3: ERROR: Program 'msgfmt' not found or not executable
> 
> I didn't investigate, but presumably it is related to this topic.

Oh, indeed. It seems like the logic to handle a missing msgfmt
executable already exists, but that I forgot to mark the executable as
optional itself. So we need the below patch to fix this.

The nice thing is that this verifies that things actually work with the
symlink on Windows :)

I've created https://github.com/j6t/gitk/pull/37 to fix the issue,
thanks!

Patrick

diff --git a/gitk-git/meson.build b/gitk-git/meson.build
index ca3c0cec58..aecc068d30 100644
--- a/gitk-git/meson.build
+++ b/gitk-git/meson.build
@@ -25,6 +25,6 @@ custom_target(
   install_dir: get_option('bindir'),
 )
 
-if find_program('msgfmt').found()
+if find_program('msgfmt', required: false).found()
   subdir('po')
 endif