Skip to content

ci: drop no-op gettext link on macOS - #2402

Open
HaraldNordgren wants to merge 1 commit into
git:masterfrom
HaraldNordgren:ci-drop-noop-gettext-link
Open

HaraldNordgren wants to merge 1 commit into
git:masterfrom
HaraldNordgren:ci-drop-noop-gettext-link

Conversation

@HaraldNordgren

@HaraldNordgren HaraldNordgren commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

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.

cc: Patrick Steinhardt [email protected]

@HaraldNordgren

Copy link
Copy Markdown
Contributor Author

/submit

@gitgitgadget-git

Copy link
Copy Markdown

Submitted as [email protected]

To fetch this version into FETCH_HEAD:

git fetch https://github.com/gitgitgadget/git/ pr-git-2402/HaraldNordgren/ci-drop-noop-gettext-link-v1

To fetch this version to local tag pr-git-2402/HaraldNordgren/ci-drop-noop-gettext-link-v1:

git fetch --no-tags https://github.com/gitgitgadget/git/ tag pr-git-2402/HaraldNordgren/ci-drop-noop-gettext-link-v1

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
(Homebrew/homebrew-core#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 <[email protected]>
@HaraldNordgren
HaraldNordgren force-pushed the ci-drop-noop-gettext-link branch from 9af619d to 39922c8 Compare September 14, 2026 07:06
@HaraldNordgren

Copy link
Copy Markdown
Contributor Author

/submit

@gitgitgadget-git

Copy link
Copy Markdown

Submitted as [email protected]

To fetch this version into FETCH_HEAD:

git fetch https://github.com/gitgitgadget/git/ pr-git-2402/HaraldNordgren/ci-drop-noop-gettext-link-v2

To fetch this version to local tag pr-git-2402/HaraldNordgren/ci-drop-noop-gettext-link-v2:

git fetch --no-tags https://github.com/gitgitgadget/git/ tag pr-git-2402/HaraldNordgren/ci-drop-noop-gettext-link-v2

@gitgitgadget-git

Copy link
Copy Markdown

Patrick Steinhardt wrote on the Git mailing list (how to reply to this email):

On Sat, Sep 12, 2026 at 07:55:39AM +0000, Harald Nordgren via GitGitGadget wrote:
> From: Harald Nordgren <[email protected]>
> 
> 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

@gitgitgadget-git

Copy link
Copy Markdown

User Patrick Steinhardt <[email protected]> has been added to the cc: list.

@gitgitgadget-git

Copy link
Copy Markdown

Harald Nordgren wrote on the Git mailing list (how to reply to this email):

> 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

@gitgitgadget-git

Copy link
Copy Markdown

Patrick Steinhardt wrote on the Git mailing list (how to reply to this email):

On Mon, Sep 14, 2026 at 08:57:49AM +0200, Harald Nordgren wrote:
> > 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

@gitgitgadget-git

Copy link
Copy Markdown

Harald Nordgren wrote on the Git mailing list (how to reply to this email):

> > 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

@gitgitgadget-git

Copy link
Copy Markdown

Junio C Hamano wrote on the Git mailing list (how to reply to this email):

"Harald Nordgren via GitGitGadget" <[email protected]> writes:

> From: Harald Nordgren <[email protected]>
>
> 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 <[email protected]>
> ---

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.

@gitgitgadget-git

Copy link
Copy Markdown

Harald Nordgren wrote on the Git mailing list (how to reply to this email):

> 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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant