<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/config.mak.dev, branch v2.34.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.34.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.34.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-09-29T04:15:53Z</updated>
<entry>
<title>Makefile: restrict -Wpedantic and -Wno-pedantic-ms-format better</title>
<updated>2021-09-29T04:15:53Z</updated>
<author>
<name>Carlo Marcelo Arenas Belón</name>
<email>carenas@gmail.com</email>
</author>
<published>2021-09-29T03:19:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ebd2e4a13a05852fd30dd5ed8aa018c14000a161'/>
<id>urn:sha1:ebd2e4a13a05852fd30dd5ed8aa018c14000a161</id>
<content type='text'>
6a8cbc41ba (developer: enable pedantic by default, 2021-09-03)
enables pedantic mode in as many compilers as possible to help gather
feedback on future tightening, so lets do so.

-Wpedantic is missing in some really old gcc 4 versions so lets restrict
it to gcc5 and clang4 (it does work in clang3 AFAIK, but it will be
unlikely that a developer will use such an old compiler anyway).

MinGW gcc is the only one which has -Wno-pedantic-ms-format, and while
that is available also in older compilers, the Windows SDK provides gcc10
so lets aim for that.

Note that in order to target the flag to only Windows, additional changes
were needed in config.mak.uname to propagate the OS detection which also
did some minor refactoring, but which is functionaly equivalent.

Helped-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Carlo Marcelo Arenas Belón &lt;carenas@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>lazyload.h: use an even more generic function pointer than FARPROC</title>
<updated>2021-09-27T20:13:58Z</updated>
<author>
<name>Carlo Marcelo Arenas Belón</name>
<email>carenas@gmail.com</email>
</author>
<published>2021-09-26T10:05:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2d84c4ed571215f4cdd5ea05a46861974d10d123'/>
<id>urn:sha1:2d84c4ed571215f4cdd5ea05a46861974d10d123</id>
<content type='text'>
gcc will helpfully raise a -Wcast-function-type warning when casting
between functions that might have incompatible return types
(ex: GetUserNameExW returns bool which is only half the size of the
return type from FARPROC which is long long), so create a new type that
could be used as a completely generic function pointer and cast through
it instead.

Additionaly remove the -Wno-incompatible-pointer-types temporary
flag added in 27e0c3c (win32: allow building with pedantic mode
enabled, 2021-09-03), as it will be no longer needed.

Signed-off-by: Carlo Marcelo Arenas Belón &lt;carenas@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>developer: enable pedantic by default</title>
<updated>2021-09-03T18:40:30Z</updated>
<author>
<name>Carlo Marcelo Arenas Belón</name>
<email>carenas@gmail.com</email>
</author>
<published>2021-09-03T17:02:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6a8cbc41bacb853e723b1ae3fcc2277535d2ba52'/>
<id>urn:sha1:6a8cbc41bacb853e723b1ae3fcc2277535d2ba52</id>
<content type='text'>
With the codebase firmly C99 compatible and most compilers supporting
newer versions by default, it could help bring visibility to problems.

Reverse the DEVOPTS=pedantic flag to provide a fallback for people stuck
with gcc &lt; 5 or some other compiler that either doesn't support this flag
or has issues with it, and while at it also enable -Wpedantic which used
to be controversial[1] when Apple compilers and clang had widely divergent
version numbers.

Ideally any compiler found to have issues with these flags will be added
to an exception, and indeed, one was added to safely process windows
headers that would use non standard print identifiers, but it is expected
that more will be needed, so it could be considered a weather balloon.

[1] https://lore.kernel.org/git/20181127100557.53891-1-carenas@gmail.com/

Signed-off-by: Carlo Marcelo Arenas Belón &lt;carenas@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>win32: allow building with pedantic mode enabled</title>
<updated>2021-09-03T18:40:30Z</updated>
<author>
<name>Carlo Marcelo Arenas Belón</name>
<email>carenas@gmail.com</email>
</author>
<published>2021-09-03T17:02:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=27e0c3c6cfead8fccd16105be497dba7ccd0ec6b'/>
<id>urn:sha1:27e0c3c6cfead8fccd16105be497dba7ccd0ec6b</id>
<content type='text'>
In preparation to building with pedantic mode enabled, change a couple
of places where the current mingw gcc compiler provided with the SDK
reports issues.

A full fix for the incompatible use of (void *) to store function
pointers has been punted, with the minimal change to instead use a
generic function pointer (FARPROC), and therefore the (hopefully)
temporary need to disable incompatible pointer warnings.

Signed-off-by: Carlo Marcelo Arenas Belón &lt;carenas@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>gettext: remove optional non-standard parens in N_() definition</title>
<updated>2021-09-03T18:40:30Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-09-03T17:02:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=153fb49e6083aed48da0b035ffdcf35c7b6eea0a'/>
<id>urn:sha1:153fb49e6083aed48da0b035ffdcf35c7b6eea0a</id>
<content type='text'>
Remove the USE_PARENS_AROUND_GETTEXT_N compile-time option which was
meant to catch an inadvertent mistake which is too obscure to
maintain this facility.

The backstory of how USE_PARENS_AROUND_GETTEXT_N came about is: When I
added the N_() macro in 65784830366 (i18n: add no-op _() and N_()
wrappers, 2011-02-22) it was defined as:

    #define N_(msgid) (msgid)

This is non-standard C, as was noticed and fixed in 642f85faab2 (i18n:
avoid parenthesized string as array initializer, 2011-04-07).
I.e. this needed to be defined as:

    #define N_(msgid) msgid

Then in e62cd35a3e8 (i18n: log: mark parseopt strings for translation,
2012-08-20) when "builtin_log_usage" was marked for translation the
string concatenation for passing to usage() added in 1c370ea4e51
(Show usage string for 'git log -h', 'git show -h' and 'git diff -h',
2009-08-06) was faithfully preserved:

-       "git log [&lt;options&gt;] [&lt;since&gt;..&lt;until&gt;] [[--] &lt;path&gt;...]\n"
-       "   or: git show [options] &lt;object&gt;...",
+       N_("git log [&lt;options&gt;] [&lt;since&gt;..&lt;until&gt;] [[--] &lt;path&gt;...]\n")
+       N_("   or: git show [options] &lt;object&gt;..."),

This was then fixed to be the expected array of usage strings in
e66dc0cc4b1 (log.c: fix translation markings, 2015-01-06) rather than
a string with multiple "\n"-delimited usage strings, and finally in
290c8e7a3fe (gettext.h: add parentheses around N_ expansion if
supported, 2015-01-11) USE_PARENS_AROUND_GETTEXT_N was added to ensure
this mistake didn't happen again.

I think that even if this was a N_()-specific issue this
USE_PARENS_AROUND_GETTEXT_N facility wouldn't be worth it, the issue
would be too rare to worry about.

But I also think that 290c8e7a3fe which introduced
USE_PARENS_AROUND_GETTEXT_N misattributed the problem. The issue
wasn't with the N_() macro added in e62cd35a3e8, but that before the
N_() macro existed in the codebase the initial migration to
parse_options() in 1c370ea4e51 continued passsing in a "\n"-delimited
string, when the new API it was migrating to supported and expected
the passing of an array.

Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Carlo Marcelo Arenas Belón &lt;carenas@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/sparse-error-for-developer-build'</title>
<updated>2020-11-18T21:32:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-18T21:32:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dfbc63da03f584fd4f281dfaffc1cec50e076289'/>
<id>urn:sha1:dfbc63da03f584fd4f281dfaffc1cec50e076289</id>
<content type='text'>
"make DEVELOPER=1 sparse" used to run sparse and let it emit
warnings; now such warnings will cause an error.

* jc/sparse-error-for-developer-build:
  Makefile: enable -Wsparse-error for DEVELOPER build
</content>
</entry>
<entry>
<title>Merge branch 'jk/perl-warning'</title>
<updated>2020-11-09T22:06:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-09T22:06:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=65681e75c1e57cb3c575969b4703323e6bdd447f'/>
<id>urn:sha1:65681e75c1e57cb3c575969b4703323e6bdd447f</id>
<content type='text'>
Dev support.

* jk/perl-warning:
  perl: check for perl warnings while running tests
</content>
</entry>
<entry>
<title>Merge branch 'jk/no-common'</title>
<updated>2020-11-02T21:17:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-02T21:17:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5277bd3e26991233199348c62c5bb7ff010f2e34'/>
<id>urn:sha1:5277bd3e26991233199348c62c5bb7ff010f2e34</id>
<content type='text'>
Dev support to catch a tentative definition of a variable in our C
code as an error.

* jk/no-common:
  config.mak.dev: build with -fno-common
</content>
</entry>
<entry>
<title>Makefile: enable -Wsparse-error for DEVELOPER build</title>
<updated>2020-10-31T22:24:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-10-31T22:22:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=521dc56270d6b4e3258175b6c521e16842acccf7'/>
<id>urn:sha1:521dc56270d6b4e3258175b6c521e16842acccf7</id>
<content type='text'>
With -Wsparse-error, "make sparse" would fail, instead of just
giving a warning message.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>perl: check for perl warnings while running tests</title>
<updated>2020-10-22T06:11:48Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-10-22T03:24:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5338ed2b26ebf91de246c59e525ad254dcbc7a84'/>
<id>urn:sha1:5338ed2b26ebf91de246c59e525ad254dcbc7a84</id>
<content type='text'>
We set "use warnings" in most of our perl code to catch problems. But as
the name implies, warnings just emit a message to stderr and don't
otherwise affect the program. So our tests are quite likely to miss that
warnings are being spewed, as most of them do not look at stderr.

We could ask perl to make all warnings fatal, but this is likely
annoying for non-developers, who would rather have a running program
with a warning than something that refuses to work at all.

So instead, let's teach the perl code to respect an environment variable
(GIT_PERL_FATAL_WARNINGS) to increase the severity of the warnings. This
can be set for day-to-day running if people want to be really pedantic,
but the primary use is to trigger it within the test suite.

We could also trigger that for every test run, but likewise even the
tests failing may be annoying to distro builders, etc (just as -Werror
would be for compiling C code). So we'll tie it to a special test-mode
variable (GIT_TEST_PERL_FATAL_WARNINGS) that can be set in the
environment or as a Makefile knob, and we'll automatically turn the knob
when DEVELOPER=1 is set. That should give developers and CI the more
careful view without disrupting normal users or packagers.

Note that the mapping from the GIT_TEST_* form to the GIT_* form in
test-lib.sh is necessary even if they had the same name: the perl
scripts need it to be normalized to a perl truth value, and we also have
to make sure it's exported (we might have gotten it from the
environment, but we might also have gotten it from GIT-BUILD-OPTIONS
directly).

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
