[PATCH v2] gitk, git-gui: drop msgfmt --statistics output
- From
Harald Nordgren via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Jun 20, 2026, 22:46 UTC
- Message-ID
- <pull.2339.v2.git.git.1781995570677.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.2339.git.git.1781459539.gitgitgadget@gmail.com>
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 eitherPublished-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: FORCEgit-gui/Makefile | 2 +- gitk-git/Makefile | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)
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