Volume XXII, number 279Tuesday, October 6, 2026Latest message 49 minutes ago

The Git List

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

patch, 2 partsSilence po catalog output under "make -s"

21 messages between Jun 14, 2026 and Jul 12, 2026, from Harald Nordgren via GitGitGadget, Harald Nordgren, Johannes Sixt, Junio C Hamano.

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

Harald Nordgren via GitGitGadgetJun 14, 2026, 17:52 UTC on lore

The gitk and git-gui catalog rules sent msgfmt --statistics output (and a "Generating catalog" line) to stderr, so it survived "make -s". Emit it only when "-s" is absent, keeping a quiet build silent and a verbose build unchanged.

Harald Nordgren (2):
  gitk: silence catalog output under "make -s"
  git-gui: silence statistics under "make -s"
 git-gui/Makefile  |  3 ++-
 gitk-git/Makefile | 10 ++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
base-commit: ea97ad8d017de0c9037451a78008a0fd60abea0c
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2339%2FHaraldNordgren%2Fsilence-catalog-output-under-make-s-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2339/HaraldNordgren/silence-catalog-output-under-make-s-v1
Pull-Request: https://github.com/git/git/pull/2339
-- 
gitgitgadget
Harald Nordgren via GitGitGadgetJun 14, 2026, 17:52 UTC in reply to Harald Nordgren via GitGitGadget on lore

[PATCH 1/2] gitk: silence catalog output under "make -s"

From: Harald Nordgren <haraldnordgren@gmail.com>

The catalog rule unconditionally echoed "Generating catalog" and ran msgfmt with --statistics, whose output went to stderr and so survived "make -s".

Emit the "Generating catalog" line and the msgfmt statistics only when "-s" is absent, leaving a quiet build silent while default and V=1 builds are unchanged.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
---
 gitk-git/Makefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
Show changes to gitk-git/Makefile +8 −2
diff --git a/gitk-git/Makefile b/gitk-git/Makefile
index 41116d8a14..10078c54d4 100644
--- a/gitk-git/Makefile
+++ b/gitk-git/Makefile
@@ -43,10 +43,16 @@ PO_TEMPLATE = po/gitk.pot
 ALL_POFILES = $(wildcard po/*.po)
 ALL_MSGFILES = $(subst .po,.msg,$(ALL_POFILES))
 
+MSGFMT_GEN = @:
+
+ifneq ($(findstring s,$(firstword -$(MAKEFLAGS))),s)
 ifndef V
 	QUIET          = @
 	QUIET_GEN      = $(QUIET)echo '   ' GEN $@ &&
 endif
+	MSGFMT_GEN   = @echo Generating catalog $@
+	MSGFMT_STATS = --statistics
+endif
 
 all:: gitk-wish $(ALL_MSGFILES)
 
@@ -75,8 +81,8 @@ update-po:: $(PO_TEMPLATE)
 	echo; \
 	echo "	git config filter.gettext-no-location.clean \"msgcat --no-location -\""
 $(ALL_MSGFILES): %.msg : %.po
-	@echo Generating catalog $@
-	$(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
+	$(MSGFMT_GEN)
+	$(MSGFMT) $(MSGFMT_STATS) --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
 
 .PHONY: all install uninstall clean update-po
 .PHONY: FORCE
-- 
gitgitgadget
Harald Nordgren via GitGitGadgetJun 14, 2026, 17:52 UTC in reply to Harald Nordgren via GitGitGadget on lore

[PATCH 2/2] git-gui: silence statistics under "make -s"

From: Harald Nordgren <haraldnordgren@gmail.com>

The catalog rule passed --statistics to msgfmt unconditionally, and its output went to stderr, so it survived "make -s".

Pass --statistics only when "-s" is absent, leaving a quiet build silent while default and V=1 builds are unchanged.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
---
 git-gui/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Show changes to git-gui/Makefile +2 −1
diff --git a/git-gui/Makefile b/git-gui/Makefile
index d33204e875..76245fa84b 100644
--- a/git-gui/Makefile
+++ b/git-gui/Makefile
@@ -90,6 +90,7 @@ ifndef V
 	REMOVE_F0 = dst=
 	REMOVE_F1 = && echo '   ' REMOVE `basename "$$dst"` && $(RM_RF) "$$dst"
 endif
+	MSGFMT_STATS = --statistics
 endif
 
 TCLTK_PATH ?= wish
@@ -155,7 +156,7 @@ $(PO_TEMPLATE): $(SCRIPT_SH) $(ALL_LIBFILES)
 update-po:: $(PO_TEMPLATE)
 	$(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U $p $(PO_TEMPLATE) ; )
 $(ALL_MSGFILES): %.msg : %.po
-	$(QUIET_MSGFMT0)$(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $< $(QUIET_MSGFMT1)
+	$(QUIET_MSGFMT0)$(MSGFMT) $(MSGFMT_STATS) --tcl -l $(basename $(notdir $<)) -d $(dir $@) $< $(QUIET_MSGFMT1)
 
 lib/tclIndex: $(ALL_LIBFILES) generate-tclindex.sh GIT-GUI-BUILD-OPTIONS
 	$(QUIET_INDEX)$(SHELL_PATH) generate-tclindex.sh . ./GIT-GUI-BUILD-OPTIONS $(ALL_LIBFILES)
-- 
gitgitgadget
Harald NordgrenJun 15, 2026, 19:25 UTC in reply to Harald Nordgren via GitGitGadget on lore

Re: [PATCH 0/2] Silence po catalog output under "make -s"

It's this output that currently is not silent:
$ make -s
...
579 translated messages.
558 translated messages.
514 translated messages.
381 translated messages, 4 fuzzy translations, 6 untranslated messages.
520 translated messages.
519 translated messages, 1 untranslated message.
546 translated messages, 1 untranslated message.
474 translated messages, 39 untranslated messages.
520 translated messages.
550 translated messages.
579 translated messages.
576 translated messages.
366 translated messages, 7 fuzzy translations, 17 untranslated messages.
543 translated messages.
Generating catalog po/bg.msg
322 translated messages.
Generating catalog po/ca.msg
307 translated messages.
Generating catalog po/de.msg
307 translated messages.
Generating catalog po/es.msg
184 translated messages, 46 fuzzy translations, 77 untranslated messages.
Generating catalog po/fr.msg
311 translated messages.
Generating catalog po/hu.msg
277 translated messages, 18 fuzzy translations, 12 untranslated messages.
Generating catalog po/it.msg
274 translated messages, 17 fuzzy translations, 16 untranslated messages.
Generating catalog po/ja.msg
311 translated messages.
Generating catalog po/pt_br.msg
279 translated messages, 16 fuzzy translations, 12 untranslated messages.
Generating catalog po/pt_pt.msg
311 translated messages.
Generating catalog po/ru.msg
317 translated messages.
Generating catalog po/sv.msg
323 translated messages.
Generating catalog po/ta.msg
Generating catalog po/vi.msg
327 translated messages.
Generating catalog po/zh_cn.msg
307 translated messages.
    GEN gitk-wish
317 translated messages.

On Sun, Jun 14, 2026 at 7:52 PM Harald Nordgren via GitGitGadget <gitgitgadget@gmail.com> wrote:

Show 21 quoted lines
>
> The gitk and git-gui catalog rules sent msgfmt --statistics output (and a
> "Generating catalog" line) to stderr, so it survived "make -s". Emit it only
> when "-s" is absent, keeping a quiet build silent and a verbose build
> unchanged.
>
> Harald Nordgren (2):
>   gitk: silence catalog output under "make -s"
>   git-gui: silence statistics under "make -s"
>
>  git-gui/Makefile  |  3 ++-
>  gitk-git/Makefile | 10 ++++++++--
>  2 files changed, 10 insertions(+), 3 deletions(-)
>
>
> base-commit: ea97ad8d017de0c9037451a78008a0fd60abea0c
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2339%2FHaraldNordgren%2Fsilence-catalog-output-under-make-s-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2339/HaraldNordgren/silence-catalog-output-under-make-s-v1
> Pull-Request: https://github.com/git/git/pull/2339
> --
> gitgitgadget
Johannes SixtJun 20, 2026, 15:46 UTC in reply to Harald Nordgren via GitGitGadget on lore

Re: [PATCH 0/2] Silence po catalog output under "make -s"

Am 14.06.26 um 19:52 schrieb Harald Nordgren via GitGitGadget:
> The gitk and git-gui catalog rules sent msgfmt --statistics output (and a
> "Generating catalog" line) to stderr, so it survived "make -s". Emit it only
> when "-s" is absent, keeping a quiet build silent and a verbose build
> unchanged.

I think that the statistics output isn't needed. A data point is that the Git repository doesn't use --statistics: 2f12b31b746c ("Makefile: don't invoke msgfmt with --statistics", 2021-12-17). So, my suggestion would be to just remove the option.

We don't need the "Generating catalog" message, either. Just remove it as well.

-- Hannes
Harald Nordgren via GitGitGadgetJun 20, 2026, 22:46 UTC in reply to Harald Nordgren via GitGitGadget on lore

[PATCH v2] gitk, git-gui: drop msgfmt --statistics output

From: Harald Nordgren <haraldnordgren@gmail.com>

The catalog rules ran msgfmt with --statistics, whose output went to stderr and so survived "make -s" (gitk also echoed "Generating catalog").

The statistics are not needed, as in 2f12b31b746c (Makefile: don't invoke msgfmt with --statistics, 2021-12-17), and the "Generating catalog" line is not needed either. Remove them so a quiet build stays quiet.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
---
    Silence po catalog output under "make -s"
    
    The gitk and git-gui catalog rules sent msgfmt --statistics output (and
    a "Generating catalog" line) to stderr, so it survived "make -s". Emit
    it only when "-s" is absent, keeping a quiet build silent and a verbose
    build unchanged.
    
    Changes in v2:
    
     * Reworked from conditionally silencing msgfmt output under make -s to
       just removing --statistics outright, following 2f12b31b74 (Makefile:
       don't invoke msgfmt with --statistics, 2021-12-17)
     * Also drop gitk's Generating catalog echo, which is not needed either
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2339%2FHaraldNordgren%2Fsilence-catalog-output-under-make-s-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2339/HaraldNordgren/silence-catalog-output-under-make-s-v2
Pull-Request: https://github.com/git/git/pull/2339
Range-diff vs v1:
 1:  18451d46e4 < -:  ---------- gitk: silence catalog output under "make -s"
 2:  5071c5106a ! 1:  ee57c25009 git-gui: silence statistics under "make -s"
     @@ Metadata
      Author: Harald Nordgren <haraldnordgren@gmail.com>
      
       ## Commit message ##
     -    git-gui: silence statistics under "make -s"
     +    gitk, git-gui: drop msgfmt --statistics output
      
     -    The catalog rule passed --statistics to msgfmt unconditionally, and its
     -    output went to stderr, so it survived "make -s".
     +    The catalog rules ran msgfmt with --statistics, whose output went to
     +    stderr and so survived "make -s" (gitk also echoed "Generating
     +    catalog").
      
     -    Pass --statistics only when "-s" is absent, leaving a quiet build silent
     -    while default and V=1 builds are unchanged.
     +    The statistics are not needed, as in 2f12b31b746c (Makefile: don't
     +    invoke msgfmt with --statistics, 2021-12-17), and the "Generating
     +    catalog" line is not needed either. Remove them so a quiet build stays
     +    quiet.
      
          Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
      
       ## git-gui/Makefile ##
     -@@ git-gui/Makefile: ifndef V
     - 	REMOVE_F0 = dst=
     - 	REMOVE_F1 = && echo '   ' REMOVE `basename "$$dst"` && $(RM_RF) "$$dst"
     - endif
     -+	MSGFMT_STATS = --statistics
     - endif
     - 
     - TCLTK_PATH ?= wish
      @@ git-gui/Makefile: $(PO_TEMPLATE): $(SCRIPT_SH) $(ALL_LIBFILES)
       update-po:: $(PO_TEMPLATE)
       	$(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U $p $(PO_TEMPLATE) ; )
       $(ALL_MSGFILES): %.msg : %.po
      -	$(QUIET_MSGFMT0)$(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $< $(QUIET_MSGFMT1)
     -+	$(QUIET_MSGFMT0)$(MSGFMT) $(MSGFMT_STATS) --tcl -l $(basename $(notdir $<)) -d $(dir $@) $< $(QUIET_MSGFMT1)
     ++	$(QUIET_MSGFMT0)$(MSGFMT) --tcl -l $(basename $(notdir $<)) -d $(dir $@) $< $(QUIET_MSGFMT1)
       
       lib/tclIndex: $(ALL_LIBFILES) generate-tclindex.sh GIT-GUI-BUILD-OPTIONS
       	$(QUIET_INDEX)$(SHELL_PATH) generate-tclindex.sh . ./GIT-GUI-BUILD-OPTIONS $(ALL_LIBFILES)
     +
     + ## gitk-git/Makefile ##
     +@@ gitk-git/Makefile: update-po:: $(PO_TEMPLATE)
     + 	echo; \
     + 	echo "	git config filter.gettext-no-location.clean \"msgcat --no-location -\""
     + $(ALL_MSGFILES): %.msg : %.po
     +-	@echo Generating catalog $@
     +-	$(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
     ++	$(MSGFMT) --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
     + 
     + .PHONY: all install uninstall clean update-po
     + .PHONY: FORCE
 git-gui/Makefile  | 2 +-
 gitk-git/Makefile | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
Show changes to 2 files +2 −3

git-gui/Makefile, gitk-git/Makefile

diff --git a/git-gui/Makefile b/git-gui/Makefile
index d33204e875..48d848a59d 100644
--- a/git-gui/Makefile
+++ b/git-gui/Makefile
@@ -155,7 +155,7 @@ $(PO_TEMPLATE): $(SCRIPT_SH) $(ALL_LIBFILES)
 update-po:: $(PO_TEMPLATE)
 	$(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U $p $(PO_TEMPLATE) ; )
 $(ALL_MSGFILES): %.msg : %.po
-	$(QUIET_MSGFMT0)$(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $< $(QUIET_MSGFMT1)
+	$(QUIET_MSGFMT0)$(MSGFMT) --tcl -l $(basename $(notdir $<)) -d $(dir $@) $< $(QUIET_MSGFMT1)
 
 lib/tclIndex: $(ALL_LIBFILES) generate-tclindex.sh GIT-GUI-BUILD-OPTIONS
 	$(QUIET_INDEX)$(SHELL_PATH) generate-tclindex.sh . ./GIT-GUI-BUILD-OPTIONS $(ALL_LIBFILES)
diff --git a/gitk-git/Makefile b/gitk-git/Makefile
index 41116d8a14..0ae083c1ca 100644
--- a/gitk-git/Makefile
+++ b/gitk-git/Makefile
@@ -75,8 +75,7 @@ update-po:: $(PO_TEMPLATE)
 	echo; \
 	echo "	git config filter.gettext-no-location.clean \"msgcat --no-location -\""
 $(ALL_MSGFILES): %.msg : %.po
-	@echo Generating catalog $@
-	$(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
+	$(MSGFMT) --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
 
 .PHONY: all install uninstall clean update-po
 .PHONY: FORCE

base-commit: 8d96f09e9245ddf80c1981476fcbac8c4bb4125f
-- 
gitgitgadget
Johannes SixtJun 21, 2026, 10:33 UTC in reply to Harald Nordgren via GitGitGadget on lore

[PATCH 2/1] git-gui: reduce complexity of the quiet msgfmt rule

In non-verbose builds (without V=1) the rule to compile *.po files with msgfmt captures the output in a shell variable and then strips down the text produced by --statistics to fit on a 80 column line. The previous commit removed --statistics output of the msgfmt invocation, so that we don't get to see anything beyond "MSGFMT po/xx.msg" anymore. Make the rule as minimal as the other "quiet" rules.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
Am 21.06.26 um 00:46 schrieb Harald Nordgren via GitGitGadget:
Show 8 quoted lines
> The catalog rules ran msgfmt with --statistics, whose output went to
> stderr and so survived "make -s" (gitk also echoed "Generating
> catalog").
> 
> The statistics are not needed, as in 2f12b31b746c (Makefile: don't
> invoke msgfmt with --statistics, 2021-12-17), and the "Generating
> catalog" line is not needed either. Remove them so a quiet build stays
> quiet.

I split off the git-gui part, adjusted the commit message, and then applied the patch below to simplify the Makefile further.

 Makefile | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Show changes to Makefile +2 −3
diff --git a/Makefile b/Makefile
index 48d848a59dfb..2e1711adc5a5 100644
--- a/Makefile
+++ b/Makefile
@@ -69,8 +69,7 @@ ifndef V
 	QUIET          = @
 	QUIET_GEN      = $(QUIET)echo '   ' GEN '$@' &&
 	QUIET_INDEX    = $(QUIET)echo '   ' INDEX $(dir $@) &&
-	QUIET_MSGFMT0  = $(QUIET)printf '    MSGFMT %12s ' $@ && v=`
-	QUIET_MSGFMT1  = 2>&1` && echo "$$v" | sed -e 's/fuzzy translations/fuzzy/' | sed -e 's/ messages*//g'
+	QUIET_MSGFMT   = $(QUIET)echo '   ' MSGFMT '$@' &&
 
 	INSTALL_D0 = dir=
 	INSTALL_D1 = && echo ' ' DEST $$dir && $(INSTALL) -d -m 755 "$$dir"
@@ -155,7 +154,7 @@ $(PO_TEMPLATE): $(SCRIPT_SH) $(ALL_LIBFILES)
 update-po:: $(PO_TEMPLATE)
 	$(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U $p $(PO_TEMPLATE) ; )
 $(ALL_MSGFILES): %.msg : %.po
-	$(QUIET_MSGFMT0)$(MSGFMT) --tcl -l $(basename $(notdir $<)) -d $(dir $@) $< $(QUIET_MSGFMT1)
+	$(QUIET_MSGFMT)$(MSGFMT) --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
 
 lib/tclIndex: $(ALL_LIBFILES) generate-tclindex.sh GIT-GUI-BUILD-OPTIONS
 	$(QUIET_INDEX)$(SHELL_PATH) generate-tclindex.sh . ./GIT-GUI-BUILD-OPTIONS $(ALL_LIBFILES)
-- 
2.55.0.rc0.230.g889306758c
Johannes SixtJun 21, 2026, 13:00 UTC in reply to Harald Nordgren via GitGitGadget on lore

Re: [PATCH v2] gitk, git-gui: drop msgfmt --statistics output

Am 21.06.26 um 00:46 schrieb Harald Nordgren via GitGitGadget:
Show 24 quoted lines
> From: Harald Nordgren <haraldnordgren@gmail.com>
> 
> The catalog rules ran msgfmt with --statistics, whose output went to
> stderr and so survived "make -s" (gitk also echoed "Generating
> catalog").
> 
> The statistics are not needed, as in 2f12b31b746c (Makefile: don't
> invoke msgfmt with --statistics, 2021-12-17), and the "Generating
> catalog" line is not needed either. Remove them so a quiet build stays
> quiet.
> diff --git a/gitk-git/Makefile b/gitk-git/Makefile
> index 41116d8a14..0ae083c1ca 100644
> --- a/gitk-git/Makefile
> +++ b/gitk-git/Makefile
> @@ -75,8 +75,7 @@ update-po:: $(PO_TEMPLATE)
>  	echo; \
>  	echo "	git config filter.gettext-no-location.clean \"msgcat --no-location -\""
>  $(ALL_MSGFILES): %.msg : %.po
> -	@echo Generating catalog $@
> -	$(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
> +	$(MSGFMT) --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
>  
>  .PHONY: all install uninstall clean update-po
>  .PHONY: FORCE

This Gitk part doesn't make the build silent, yet. It misses the "if -s is in the flags" bracket.

It do not mind doing both (removing --statistics and make it silent) in a single patch.

BTW, please write commit message in the usual style, in particular, describe the status quo in present tense, not past tense.

Please bear in mind that Git, Gitk and Git GUI are tracked in different repositories. Do not put changes to multiple of these into a single commit/patch.

-- Hannes
Harald NordgrenJun 21, 2026, 13:15 UTC in reply to Johannes Sixt on lore

Re: [PATCH v2] gitk, git-gui: drop msgfmt --statistics output

Hi Johannes!

Thanks for the feedback here. What do you want me to do now, should I update my code or you are taking over the whole thing from me?

Harald
Johannes SixtJun 21, 2026, 13:27 UTC in reply to Harald Nordgren on lore

Re: [PATCH v2] gitk, git-gui: drop msgfmt --statistics output

Am 21.06.26 um 15:15 schrieb Harald Nordgren:
> Thanks for the feedback here. What do you want me to do now, should I
> update my code or you are taking over the whole thing from me?

The git-gui part is good. The Gitk part needs more work. Please submit a new patch for Gitk under the topic "make `make -s` silent". That this has to remove --statistics from msgfmt invocations is just a part of this topic.

-- Hannes
Harald NordgrenJun 21, 2026, 13:32 UTC in reply to Johannes Sixt on lore

Re: [PATCH v2] gitk, git-gui: drop msgfmt --statistics output

Same series or a new series alongside this one?
Harald
Johannes SixtJun 21, 2026, 13:47 UTC in reply to Harald Nordgren on lore

Re: [PATCH v2] gitk, git-gui: drop msgfmt --statistics output

Am 21.06.26 um 15:32 schrieb Harald Nordgren:
> Same series or a new series alongside this one?

Don't start a new thread. Since you are using Gitgitgadget, I think this means that it should be the "same series", whatever the means for you.

-- Hannes
Harald Nordgren via GitGitGadgetJun 21, 2026, 14:56 UTC in reply to Harald Nordgren via GitGitGadget on lore

[PATCH v3 0/2] Silence po catalog output under "make -s"

The gitk and git-gui are noisy despite "make -s", quiet the builds.
Changes in v3:
 * Split the single combined commit into two, one per Makefile (gitk,
   git-gui)
 * gitk: gate the quiet helpers on -s in MAKEFLAGS and give the catalog rule
   a QUIET_MSGFMT prefix, so a silent build emits no MSGFMT/GEN lines
 * git-gui: replace the QUIET_MSGFMT0/QUIET_MSGFMT1 pair with a single
   QUIET_MSGFMT, since with --statistics gone there is no output left to
   reformat
Changes in v2:
 * Reworked from conditionally silencing msgfmt output under make -s to just
   removing --statistics outright, following 2f12b31b74 (Makefile: don't
   invoke msgfmt with --statistics, 2021-12-17)
 * Also drop gitk's Generating catalog echo, which is not needed either
Harald Nordgren (2):
  gitk: make "make -s" silent
  git-gui: silence statistics under "make -s"
 git-gui/Makefile  | 5 ++---
 gitk-git/Makefile | 6 ++++--
 2 files changed, 6 insertions(+), 5 deletions(-)
base-commit: 8d96f09e9245ddf80c1981476fcbac8c4bb4125f
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2339%2FHaraldNordgren%2Fsilence-catalog-output-under-make-s-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2339/HaraldNordgren/silence-catalog-output-under-make-s-v3
Pull-Request: https://github.com/git/git/pull/2339
Range-diff vs v2:
 1:  ee57c25009 ! 1:  4d977d6f3f gitk, git-gui: drop msgfmt --statistics output
     @@ Metadata
      Author: Harald Nordgren <haraldnordgren@gmail.com>
      
       ## Commit message ##
     -    gitk, git-gui: drop msgfmt --statistics output
     +    gitk: make "make -s" silent
      
     -    The catalog rules ran msgfmt with --statistics, whose output went to
     -    stderr and so survived "make -s" (gitk also echoed "Generating
     -    catalog").
     +    The catalog rule runs msgfmt with --statistics, whose output goes to
     +    stderr and so survives "make -s", and the rule also echoes "Generating
     +    catalog". The Gitk Makefile guards its quiet helpers on V alone, so a
     +    silent build still prints these and the GEN line.
      
          The statistics are not needed, as in 2f12b31b746c (Makefile: don't
     -    invoke msgfmt with --statistics, 2021-12-17), and the "Generating
     -    catalog" line is not needed either. Remove them so a quiet build stays
     -    quiet.
     +    invoke msgfmt with --statistics, 2021-12-17). Drop them, suppress the
     +    quiet helpers when "s" is among the make flags, and give the catalog
     +    rule a quiet prefix so a quiet build stays quiet.
      
          Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
      
     - ## git-gui/Makefile ##
     -@@ git-gui/Makefile: $(PO_TEMPLATE): $(SCRIPT_SH) $(ALL_LIBFILES)
     - update-po:: $(PO_TEMPLATE)
     - 	$(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U $p $(PO_TEMPLATE) ; )
     - $(ALL_MSGFILES): %.msg : %.po
     --	$(QUIET_MSGFMT0)$(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $< $(QUIET_MSGFMT1)
     -+	$(QUIET_MSGFMT0)$(MSGFMT) --tcl -l $(basename $(notdir $<)) -d $(dir $@) $< $(QUIET_MSGFMT1)
     - 
     - lib/tclIndex: $(ALL_LIBFILES) generate-tclindex.sh GIT-GUI-BUILD-OPTIONS
     - 	$(QUIET_INDEX)$(SHELL_PATH) generate-tclindex.sh . ./GIT-GUI-BUILD-OPTIONS $(ALL_LIBFILES)
     -
       ## gitk-git/Makefile ##
     +@@ gitk-git/Makefile: PO_TEMPLATE = po/gitk.pot
     + ALL_POFILES = $(wildcard po/*.po)
     + ALL_MSGFILES = $(subst .po,.msg,$(ALL_POFILES))
     + 
     ++ifneq ($(findstring s,$(firstword -$(MAKEFLAGS))),s)
     + ifndef V
     + 	QUIET          = @
     + 	QUIET_GEN      = $(QUIET)echo '   ' GEN $@ &&
     ++	QUIET_MSGFMT   = $(QUIET)echo '   ' MSGFMT $@ &&
     ++endif
     + endif
     + 
     + all:: gitk-wish $(ALL_MSGFILES)
      @@ gitk-git/Makefile: update-po:: $(PO_TEMPLATE)
       	echo; \
       	echo "	git config filter.gettext-no-location.clean \"msgcat --no-location -\""
       $(ALL_MSGFILES): %.msg : %.po
      -	@echo Generating catalog $@
      -	$(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
     -+	$(MSGFMT) --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
     ++	$(QUIET_MSGFMT)$(MSGFMT) --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
       
       .PHONY: all install uninstall clean update-po
       .PHONY: FORCE
 -:  ---------- > 2:  b613d4ac4a git-gui: silence statistics under "make -s"
-- 
gitgitgadget
Harald Nordgren via GitGitGadgetJun 21, 2026, 14:56 UTC in reply to Harald Nordgren via GitGitGadget on lore

[PATCH v3 1/2] gitk: make "make -s" silent

From: Harald Nordgren <haraldnordgren@gmail.com>

The catalog rule runs msgfmt with --statistics, whose output goes to stderr and so survives "make -s", and the rule also echoes "Generating catalog". The Gitk Makefile guards its quiet helpers on V alone, so a silent build still prints these and the GEN line.

The statistics are not needed, as in 2f12b31b746c (Makefile: don't invoke msgfmt with --statistics, 2021-12-17). Drop them, suppress the quiet helpers when "s" is among the make flags, and give the catalog rule a quiet prefix so a quiet build stays quiet.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
---
 gitk-git/Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Show changes to gitk-git/Makefile +4 −2
diff --git a/gitk-git/Makefile b/gitk-git/Makefile
index 41116d8a14..dd87f501e5 100644
--- a/gitk-git/Makefile
+++ b/gitk-git/Makefile
@@ -43,9 +43,12 @@ PO_TEMPLATE = po/gitk.pot
 ALL_POFILES = $(wildcard po/*.po)
 ALL_MSGFILES = $(subst .po,.msg,$(ALL_POFILES))
 
+ifneq ($(findstring s,$(firstword -$(MAKEFLAGS))),s)
 ifndef V
 	QUIET          = @
 	QUIET_GEN      = $(QUIET)echo '   ' GEN $@ &&
+	QUIET_MSGFMT   = $(QUIET)echo '   ' MSGFMT $@ &&
+endif
 endif
 
 all:: gitk-wish $(ALL_MSGFILES)
@@ -75,8 +78,7 @@ update-po:: $(PO_TEMPLATE)
 	echo; \
 	echo "	git config filter.gettext-no-location.clean \"msgcat --no-location -\""
 $(ALL_MSGFILES): %.msg : %.po
-	@echo Generating catalog $@
-	$(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
+	$(QUIET_MSGFMT)$(MSGFMT) --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
 
 .PHONY: all install uninstall clean update-po
 .PHONY: FORCE
-- 
gitgitgadget
Harald Nordgren via GitGitGadgetJun 21, 2026, 14:56 UTC in reply to Harald Nordgren via GitGitGadget on lore

[PATCH v3 2/2] git-gui: silence statistics under "make -s"

From: Harald Nordgren <haraldnordgren@gmail.com>

The catalog rule runs msgfmt with --statistics, whose output goes to stderr and so survives "make -s". In non-verbose builds the rule also captures the output in a shell variable to strip it to an 80 column line.

The statistics are not needed, as in 2f12b31b746c (Makefile: don't invoke msgfmt with --statistics, 2021-12-17). Remove them, and with nothing left to format make the rule as minimal as the other quiet rules, so a quiet build stays quiet.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
---
 git-gui/Makefile | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Show changes to git-gui/Makefile +2 −3
diff --git a/git-gui/Makefile b/git-gui/Makefile
index d33204e875..2e1711adc5 100644
--- a/git-gui/Makefile
+++ b/git-gui/Makefile
@@ -69,8 +69,7 @@ ifndef V
 	QUIET          = @
 	QUIET_GEN      = $(QUIET)echo '   ' GEN '$@' &&
 	QUIET_INDEX    = $(QUIET)echo '   ' INDEX $(dir $@) &&
-	QUIET_MSGFMT0  = $(QUIET)printf '    MSGFMT %12s ' $@ && v=`
-	QUIET_MSGFMT1  = 2>&1` && echo "$$v" | sed -e 's/fuzzy translations/fuzzy/' | sed -e 's/ messages*//g'
+	QUIET_MSGFMT   = $(QUIET)echo '   ' MSGFMT '$@' &&
 
 	INSTALL_D0 = dir=
 	INSTALL_D1 = && echo ' ' DEST $$dir && $(INSTALL) -d -m 755 "$$dir"
@@ -155,7 +154,7 @@ $(PO_TEMPLATE): $(SCRIPT_SH) $(ALL_LIBFILES)
 update-po:: $(PO_TEMPLATE)
 	$(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U $p $(PO_TEMPLATE) ; )
 $(ALL_MSGFILES): %.msg : %.po
-	$(QUIET_MSGFMT0)$(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $< $(QUIET_MSGFMT1)
+	$(QUIET_MSGFMT)$(MSGFMT) --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
 
 lib/tclIndex: $(ALL_LIBFILES) generate-tclindex.sh GIT-GUI-BUILD-OPTIONS
 	$(QUIET_INDEX)$(SHELL_PATH) generate-tclindex.sh . ./GIT-GUI-BUILD-OPTIONS $(ALL_LIBFILES)
-- 
gitgitgadget
Johannes SixtJun 23, 2026, 16:23 UTC in reply to Harald Nordgren via GitGitGadget on lore

Re: [PATCH v3 0/2] Silence po catalog output under "make -s"

Am 21.06.26 um 16:56 schrieb Harald Nordgren via GitGitGadget:
>  * gitk: gate the quiet helpers on -s in MAKEFLAGS and give the catalog rule
>    a QUIET_MSGFMT prefix, so a silent build emits no MSGFMT/GEN lines
I've picked up this one.
>  * git-gui: replace the QUIET_MSGFMT0/QUIET_MSGFMT1 pair with a single
>    QUIET_MSGFMT, since with --statistics gone there is no output left to
>    reformat

But this one, I skipped, because I already have all of it in https://github.com/j6t/git-gui/commits/hn/silence-make-s/

Thanks! -- Hannes

Harald NordgrenJun 26, 2026, 19:27 UTC in reply to Johannes Sixt on lore

Re: [PATCH v3 0/2] Silence po catalog output under "make -s"

Hi Johannes!
Thanks for the help. What should I expect here, will it be merged to master now?
Harald
On Tue, Jun 23, 2026 at 6:23 PM Johannes Sixt <j6t@kdbg.org> wrote:
Show 17 quoted lines
>
> Am 21.06.26 um 16:56 schrieb Harald Nordgren via GitGitGadget:
> >  * gitk: gate the quiet helpers on -s in MAKEFLAGS and give the catalog rule
> >    a QUIET_MSGFMT prefix, so a silent build emits no MSGFMT/GEN lines
>
> I've picked up this one.
>
> >  * git-gui: replace the QUIET_MSGFMT0/QUIET_MSGFMT1 pair with a single
> >    QUIET_MSGFMT, since with --statistics gone there is no output left to
> >    reformat
>
> But this one, I skipped, because I already have all of it in
> https://github.com/j6t/git-gui/commits/hn/silence-make-s/
>
> Thanks!
> -- Hannes
>
Johannes SixtJun 27, 2026, 09:34 UTC in reply to Harald Nordgren on lore

Re: [PATCH v3 0/2] Silence po catalog output under "make -s"

Am 26.06.26 um 21:27 schrieb Harald Nordgren:
> What should I expect here, will it be merged to master now?

These patches are cooking in my respective j6t-testing branches in my repositories[1][2]. I'll ask for inclusion in the Git repository in the coming weeks (but certainly not for v2.55).

-- Hannes

[1] https://github.com/j6t/git-gui/commits/j6t-testing/ [2] https://github.com/j6t/gitk/commits/j6t-testing/

Junio C HamanoJun 28, 2026, 01:43 UTC in reply to Johannes Sixt on lore

Re: [PATCH v3 0/2] Silence po catalog output under "make -s"

Johannes Sixt <j6t@kdbg.org> writes:
Show 11 quoted lines
> Am 26.06.26 um 21:27 schrieb Harald Nordgren:
>> What should I expect here, will it be merged to master now?
>
> These patches are cooking in my respective j6t-testing branches in my
> repositories[1][2]. I'll ask for inclusion in the Git repository in the
> coming weeks (but certainly not for v2.55).
>
> -- Hannes
>
> [1] https://github.com/j6t/git-gui/commits/j6t-testing/
> [2] https://github.com/j6t/gitk/commits/j6t-testing/
Thanks.
Harald NordgrenJul 12, 2026, 18:31 UTC in reply to Junio C Hamano on lore

Re: [PATCH v3 0/2] Silence po catalog output under "make -s"

Hi!
What is the status here?
Harald
Junio C HamanoJul 12, 2026, 19:41 UTC in reply to Harald Nordgren on lore

Re: [PATCH v3 0/2] Silence po catalog output under "make -s"

Harald Nordgren <haraldnordgren@gmail.com> writes:
Show 5 quoted lines
> Hi!
>
> What is the status here?
>
> Harald

If I understand correctly, J6t told me to expect a pull request in https://lore.kernel.org/git/40b7eee4-6b45-449f-a3a0-0ae415097041@kdbg.org/ but it will happen after v2.55 is tagged.

And in response I said "Thanks."
I think that is where we stand right now.
Thanks.

Back to recent threads