]> 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:06:45 +0000 (16:06 +0200)
commit26c8529d0ee30d79579024a43da2c77275ee586e
treebccde5082faf77ed4d95570effd84cd289a1a435
parentb71cbac4fac7e2b0e23a14b9daedc07d6b8b5ca8
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