Volume XXII, number 279Tuesday, October 6, 2026Latest message 1 hour ago

The Git List

News and archive of git@vger.kernel.org, since April 2005

patchci: drop no-op gettext link on macOS

8 messages between Sep 12, 2026 and Sep 26, 2026, from Harald Nordgren via GitGitGadget, Patrick Steinhardt, Harald Nordgren, Junio C Hamano.

Plain Markdown or JSON for tools and agents. Diffs are folded; open one to read it.

Harald Nordgren via GitGitGadgetSep 12, 2026, 07:55 UTC on lore
From: Harald Nordgren <haraldnordgren@gmail.com>

gettext ships already linked on the macOS CI runner image, so this command never links anything. It only emits a spurious "Already linked" warning in every macOS job's log.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
---
    ci: drop no-op gettext link on macOS
    
    Gettext is already linked on the macOS CI runner image, so the forced
    relink was a no-op that only produced a spurious "Already linked"
    warning in every macOS job's log.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2402%2FHaraldNordgren%2Fci-drop-noop-gettext-link-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2402/HaraldNordgren/ci-drop-noop-gettext-link-v1
Pull-Request: https://github.com/git/git/pull/2402
 ci/install-dependencies.sh | 1 -
 1 file changed, 1 deletion(-)
Show changes to ci/install-dependencies.sh +0 −1
diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index 2f61fbb07c..2903c39fab 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -117,7 +117,6 @@ macos-*)
 	export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1
 	# Uncomment this if you want to run perf tests:
 	# brew install gnu-time
-	brew link --force gettext
 
 	mkdir -p "$CUSTOM_PATH"
 	wget -q "$P4WHENCE/bin.macosx12arm64/helix-core-server.tgz" &&

base-commit: 47ce80527c56f462cb97db4ca8125342204d3783
-- 
gitgitgadget
Patrick SteinhardtSep 14, 2026, 06:25 UTC in reply to Harald Nordgren via GitGitGadget on lore

Re: [PATCH] ci: drop no-op gettext link on macOS

On Sat, Sep 12, 2026 at 07:55:39AM +0000, Harald Nordgren via GitGitGadget wrote:
Show 5 quoted lines
> From: Harald Nordgren <haraldnordgren@gmail.com>
> 
> gettext ships already linked on the macOS CI runner image, so this
> command never links anything. It only emits a spurious "Already
> linked" warning in every macOS job's log.

I feel like this is oversimplifying things a bit. The commit message doesn't explain why we even orignially had it, and consequently it's not really explaining why we don't anymore.

The gettext dependency in Homebrew is keg-only, which means that it will typically never be linked anywhere visible into your system. Instead, it is only being installed into your Homebrew cellar, which means that it will not interfer with anything. And trying to link such a dependency will not do anything, as Homebrew refuses such an operation.

By using `brew link --force` though you override that and thus override any system-provided equivalents by symlinking the dependency into a central place. Now the question is whether this is still needed. But that question is not answered by your commit message. The warning that you mention is this one:

  + brew link --force gettext
  ✔︎ JSON API formula_tap_migrations.jws.json
  ✔︎ JSON API cask_tap_migrations.jws.json
  Warning: Already linked: /opt/homebrew/Cellar/gettext/1.0
  To relink, run:
    brew unlink gettext && brew link gettext

But that warning only complains that gettext is already linked into your cellar. It does not say whether it may have linked the library into your system's path now.

So I'm still left wondering whether it really isn't required anymore, and if so why it stopped being required. Links to passing GitHub and GitLab pipelines with that change would've in this case also helped to demonstrate that it works without that line.

Thanks!
Patrick
Harald NordgrenSep 14, 2026, 06:57 UTC in reply to Patrick Steinhardt on lore

Re: [PATCH] ci: drop no-op gettext link on macOS

> So I'm still left wondering whether it really isn't required anymore,
> and if so why it stopped being required. Links to passing GitHub and
> GitLab pipelines with that change would've in this case also helped to
> demonstrate that it works without that line.
It passed on GitHub: https://github.com/git/git/pull/2402
I'll take a look at the rest of your comments as well, thanks for the help!
Harald
Harald Nordgren via GitGitGadgetSep 14, 2026, 07:09 UTC in reply to Harald Nordgren via GitGitGadget on lore

[PATCH v2] ci: drop no-op gettext link on macOS

From: Harald Nordgren <haraldnordgren@gmail.com>

Homebrew's gettext formula used to be keg-only, meaning brew would install it into the Cellar without linking its headers, libraries, or utilities like msgfmt anywhere on the default search paths, to avoid clashing with software that already ships its own gettext. `brew link --force gettext` overrode that restriction so the keg-only install became visible on the paths git's build and tests rely on.

Homebrew dropped gettext's keg-only status in 2020 (https://github.com/Homebrew/homebrew-core/pull/53489), so a fresh install now links into the prefix by itself. `brew link --force` against an already-linked keg has nothing left to override, and only produces a spurious "Already linked" warning in every macOS job's log.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
---
    ci: drop no-op gettext link on macOS
    
    Gettext is already linked on the macOS CI runner image, so the forced
    relink was a no-op that only produced a spurious "Already linked"
    warning in every macOS job's log.
    
    Changes in v2:
    
     * Clarify problem in commit message.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2402%2FHaraldNordgren%2Fci-drop-noop-gettext-link-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2402/HaraldNordgren/ci-drop-noop-gettext-link-v2
Pull-Request: https://github.com/git/git/pull/2402
Range-diff vs v1:
 1:  9af619d085 ! 1:  39922c8e97 ci: drop no-op gettext link on macOS
     @@ Metadata
       ## Commit message ##
          ci: drop no-op gettext link on macOS
      
     -    gettext ships already linked on the macOS CI runner image, so this
     -    command never links anything. It only emits a spurious "Already
     -    linked" warning in every macOS job's log.
     +    Homebrew's gettext formula used to be keg-only, meaning brew would
     +    install it into the Cellar without linking its headers, libraries, or
     +    utilities like msgfmt anywhere on the default search paths, to avoid
     +    clashing with software that already ships its own gettext. `brew link
     +    --force gettext` overrode that restriction so the keg-only install
     +    became visible on the paths git's build and tests rely on.
     +
     +    Homebrew dropped gettext's keg-only status in 2020
     +    (https://github.com/Homebrew/homebrew-core/pull/53489), so a fresh
     +    install now links into the prefix by itself. `brew link --force`
     +    against an already-linked keg has nothing left to override, and only
     +    produces a spurious "Already linked" warning in every macOS job's
     +    log.
      
          Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
      
 ci/install-dependencies.sh | 1 -
 1 file changed, 1 deletion(-)
Show changes to ci/install-dependencies.sh +0 −1
diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index 2f61fbb07c..2903c39fab 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -117,7 +117,6 @@ macos-*)
 	export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1
 	# Uncomment this if you want to run perf tests:
 	# brew install gnu-time
-	brew link --force gettext
 
 	mkdir -p "$CUSTOM_PATH"
 	wget -q "$P4WHENCE/bin.macosx12arm64/helix-core-server.tgz" &&

base-commit: 47ce80527c56f462cb97db4ca8125342204d3783
-- 
gitgitgadget
Patrick SteinhardtSep 14, 2026, 07:53 UTC in reply to Harald Nordgren on lore

Re: [PATCH] ci: drop no-op gettext link on macOS

On Mon, Sep 14, 2026 at 08:57:49AM +0200, Harald Nordgren wrote:
Show 8 quoted lines
> > So I'm still left wondering whether it really isn't required anymore,
> > and if so why it stopped being required. Links to passing GitHub and
> > GitLab pipelines with that change would've in this case also helped to
> > demonstrate that it works without that line.
> 
> It passed on GitHub: https://github.com/git/git/pull/2402
> 
> I'll take a look at the rest of your comments as well, thanks for the help!

If you look at the pipeline though you can see that almost all of the jobs were skippped. And in particular, macOS wasn't tested at all.

Patrick
Harald NordgrenSep 14, 2026, 08:50 UTC in reply to Patrick Steinhardt on lore

Re: [PATCH] ci: drop no-op gettext link on macOS

Show 6 quoted lines
> > It passed on GitHub: https://github.com/git/git/pull/2402
> >
> > I'll take a look at the rest of your comments as well, thanks for the help!
>
> If you look at the pipeline though you can see that almost all of the
> jobs were skippped. And in particular, macOS wasn't tested at all.

That's after I pushed to update the commit message, it didn't re-trigger because the code was the same I think.

Here is an earlier test run when macOS tests were successfully run: https://github.com/git/git/actions/runs/34655661080

Harald
Junio C HamanoSep 26, 2026, 04:36 UTC in reply to Harald Nordgren via GitGitGadget on lore

Re: [PATCH v2] ci: drop no-op gettext link on macOS

"Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 18 quoted lines
> From: Harald Nordgren <haraldnordgren@gmail.com>
>
> Homebrew's gettext formula used to be keg-only, meaning brew would
> install it into the Cellar without linking its headers, libraries, or
> utilities like msgfmt anywhere on the default search paths, to avoid
> clashing with software that already ships its own gettext. `brew link
> --force gettext` overrode that restriction so the keg-only install
> became visible on the paths git's build and tests rely on.
>
> Homebrew dropped gettext's keg-only status in 2020
> (https://github.com/Homebrew/homebrew-core/pull/53489), so a fresh
> install now links into the prefix by itself. `brew link --force`
> against an already-linked keg has nothing left to override, and only
> produces a spurious "Already linked" warning in every macOS job's
> log.
>
> Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
> ---

Sorry, but I lost track. There were review exchanges on the previous round, which crossed with this new iteration. Is this patch still relevant and do folks on macOS need this?

Thanks.
Harald NordgrenSep 26, 2026, 13:33 UTC in reply to Junio C Hamano on lore

Re: [PATCH v2] ci: drop no-op gettext link on macOS

> Sorry, but I lost track.  There were review exchanges on the
> previous round, which crossed with this new iteration.  Is this
> patch still relevant and do folks on macOS need this?
Hi, no worries!

Yes, it’s still relevant. It’s not for local macOS development, but to silence a warning message on the GitHub CI builds for macOS.

Harald

Back to recent threads