]> git.ipfire.org Git - thirdparty/gettext.git/commit
xgettext: Add an option to opt-out of the use of git for the POT-Creation-Date.
authorBruno Haible <bruno@clisp.org>
Fri, 2 May 2025 14:06:45 +0000 (16:06 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 2 May 2025 14:24:13 +0000 (16:24 +0200)
commit59782d1f8cc54be387273e3023a4ddcd6416590a
tree13160277e849b643f721326fbf36e0b7c5a4663d
parent8ce6f7d45e4822787c685625dff061212e48a007
xgettext: Add an option to opt-out of the use of git for the POT-Creation-Date.

Reported by Serhii Tereshchenko at <https://savannah.gnu.org/bugs/?66865>.

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add stat-time.
* gettext-tools/src/xgettext.c: Include stat-time.h.
(xgettext_no_git): New variable.
(long_options): Add option '--no-git'.
(main): Handle the option --no-git.
(usage): Document the option --no-git.
(struct accumulator): New type, copied from gnulib/lib/vc-mtime.c.
(accumulate): New function, copied from gnulib/lib/vc-mtime.c.
(max_mtime_without_git): New function, based on gnulib/lib/vc-mtime.c.
(finalize_header): Conditionally invoke max_mtime_without_git instead of
max_vc_mtime.
* gettext-tools/doc/xgettext.texi: Document the option --no-git.
* NEWS: Mention the change.
NEWS
autogen.sh
gettext-tools/doc/xgettext.texi
gettext-tools/src/xgettext.c