<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/config.mak.dev, branch jch</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=jch</id>
<link rel='self' href='https://git.shady.money/git/atom?h=jch'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2026-03-19T13:40:09Z</updated>
<entry>
<title>builds: move build scripts into "tools/"</title>
<updated>2026-03-19T13:40:09Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-03-19T05:33:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a767f2fd6c5a6104ff32a35a27f0c15aec546957'/>
<id>urn:sha1:a767f2fd6c5a6104ff32a35a27f0c15aec546957</id>
<content type='text'>
We have a bunch of scripts used by our different build systems that are
all located in the top-level directory. Now that we have introduced the
new "tools/" directory though we have a better home for them.

Move the scripts into the "tools/" directory.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/comma-semicolon-confusion'</title>
<updated>2025-04-15T20:50:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-04-15T20:50:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7b03646f85b6eb4c0f6e05ed4b235577d3969532'/>
<id>urn:sha1:7b03646f85b6eb4c0f6e05ed4b235577d3969532</id>
<content type='text'>
Code clean-up.

* js/comma-semicolon-confusion:
  detect-compiler: detect clang even if it found CUDA
  clang: warn when the comma operator is used
  compat/regex: explicitly mark intentional use of the comma operator
  wildmatch: avoid using of the comma operator
  diff-delta: avoid using the comma operator
  xdiff: avoid using the comma operator unnecessarily
  clar: avoid using the comma operator unnecessarily
  kwset: avoid using the comma operator unnecessarily
  rebase: avoid using the comma operator unnecessarily
  remote-curl: avoid using the comma operator unnecessarily
</content>
</entry>
<entry>
<title>clang: warn when the comma operator is used</title>
<updated>2025-03-29T00:38:12Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2025-03-27T11:53:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3db4cb987f114186744025432fc201bbea1ccc7b'/>
<id>urn:sha1:3db4cb987f114186744025432fc201bbea1ccc7b</id>
<content type='text'>
When compiling Git using `clang`, the `-Wcomma` option can be used to
warn about code using the comma operator (because it is typically
unintentional and wants to use the semicolon instead).

Helped-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Acked-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>config.mak.dev: enable -Wunreachable-code</title>
<updated>2025-03-18T00:31:28Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2025-03-17T23:53:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=16f5d967e2267ea37cd29d7aee21994921b6b98c'/>
<id>urn:sha1:16f5d967e2267ea37cd29d7aee21994921b6b98c</id>
<content type='text'>
Having the compiler point out unreachable code can help avoid bugs, like
the one discussed in:

  https://lore.kernel.org/git/20250307195057.GA3675279@coredump.intra.peff.net/

In that case it was found by Coverity, but finding it earlier saves
everybody time and effort.

We can use -Wunreachable-code to get some help from the compiler here.
Interestingly, this is a noop in gcc. It was a real warning up until gcc
4.x, when it was removed for being too flaky, but they left the
command-line option to avoid breaking users. See:

  https://stackoverflow.com/questions/17249934/why-does-gcc-not-warn-for-unreachable-code

However, clang does implement this option, and it finds the case
mentioned above (and no other cases within the code base). And since we
run clang in several of our CI jobs, that's enough to get an early
warning of breakage.

We could enable it only for clang, but since gcc is happy to ignore it,
it's simpler to just turn it on for all developer builds.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
[jc: squashed meson.build change sent by Patrick]
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>config.mak.dev: drop `-Wno-sign-compare`</title>
<updated>2024-12-06T11:20:02Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-12-06T10:27:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4f9264b0cdf588745ebd71638a216e626b89df35'/>
<id>urn:sha1:4f9264b0cdf588745ebd71638a216e626b89df35</id>
<content type='text'>
There is no need anymore to disable `-Wsign-compare` now that all files
that cause warnings have been marked accordingly. Drop the option.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ak/typofix-2.46-maint'</title>
<updated>2024-09-25T17:37:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-09-25T17:37:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=78ce6660bba5fd2faf03efd79912725dcf5be481'/>
<id>urn:sha1:78ce6660bba5fd2faf03efd79912725dcf5be481</id>
<content type='text'>
Typofix.

* ak/typofix-2.46-maint:
  upload-pack: fix a typo
  sideband: fix a typo
  setup: fix a typo
  run-command: fix a typo
  revision: fix a typo
  refs: fix typos
  rebase: fix a typo
  read-cache-ll: fix a typo
  pretty: fix a typo
  object-file: fix a typo
  merge-ort: fix typos
  merge-ll: fix a typo
  http: fix a typo
  gpg-interface: fix a typo
  git-p4: fix typos
  git-instaweb: fix a typo
  fsmonitor-settings: fix a typo
  diffcore-rename: fix typos
  config.mak.dev: fix a typo
</content>
</entry>
<entry>
<title>config.mak.dev: fix a typo</title>
<updated>2024-09-19T20:45:59Z</updated>
<author>
<name>Andrew Kreimer</name>
<email>algonell@gmail.com</email>
</author>
<published>2024-09-19T18:34:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=26eab80642812a5ad956c77df8dbaf702ee4bac6'/>
<id>urn:sha1:26eab80642812a5ad956c77df8dbaf702ee4bac6</id>
<content type='text'>
Fix a typo in comments.

Signed-off-by: Andrew Kreimer &lt;algonell@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>config.mak.dev: enable -Wunused-parameter by default</title>
<updated>2024-08-28T16:51:18Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2024-08-28T04:00:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a219a6739cc14b52a7ba08170eebe9cf11505667'/>
<id>urn:sha1:a219a6739cc14b52a7ba08170eebe9cf11505667</id>
<content type='text'>
Having now removed or annotated all of the unused function parameters in
our code base, I found that each instance falls into one of three
categories:

  1. ignoring the parameter is a bug (e.g., a function takes a ptr/len
     pair, but ignores the length). Detecting these helps us find the
     bugs.

  2. the parameter is unnecessary (and usually left over from a
     refactoring or earlier iteration of a patches series). Removing
     these cleans up the code.

  3. the function has to conform to a specific interface (because it's
     used via a function pointer, or matches something on the other side
     of an #ifdef). These ones are annoying, but annotating them with
     UNUSED is not too bad (especially if the compiler tells you about
     the problem promptly).

Certainly instances of (3) are more common than (1), but after finding
all of these, I think there were enough cases of (1) that it justifies
the work in annotating all of the (3)s.

And since the code base is now at a spot where we compile cleanly with
-Wunused-parameter, turning it on will make it the responsibility of
individual patch writers going forward.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tb/dev-build-pedantic-fix'</title>
<updated>2024-07-15T17:11:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-07-15T17:11:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d319ad57044b44783e5fa11f1d17c54747388491'/>
<id>urn:sha1:d319ad57044b44783e5fa11f1d17c54747388491</id>
<content type='text'>
Developer build procedure fix.

* tb/dev-build-pedantic-fix:
  config.mak.dev: fix typo when enabling -Wpedantic
</content>
</entry>
<entry>
<title>config.mak.dev: fix typo when enabling -Wpedantic</title>
<updated>2024-07-06T22:10:29Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2024-07-05T18:51:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=df327298664ec9290d71c6086339823017f2caee'/>
<id>urn:sha1:df327298664ec9290d71c6086339823017f2caee</id>
<content type='text'>
In ebd2e4a13a (Makefile: restrict -Wpedantic and -Wno-pedantic-ms-format
better, 2021-09-28), we tightened our Makefile's behavior to only enable
-Wpedantic when compiling with either gcc5/clang4 or greater as older
compiler versions did not have support for -Wpedantic.

Commit ebd2e4a13a was looking for either "gcc5" or "clang4" to appear in
the COMPILER_FEATURES variable, combining the two "$(filter ...)"
searches with an "$(or ...)".

But ebd2e4a13a has a typo where instead of writing:

    ifneq ($(or ($filter ...),$(filter ...)),)

we wrote:

    ifneq (($or ($filter ...),$(filter ...)),)

Causing our Makefile (when invoked with DEVELOPER=1, and a sufficiently
recent compiler version) to barf:

    $ make DEVELOPER=1
    config.mak.dev:13: extraneous text after 'ifneq' directive
    [...]

Correctly combine the results of the two "$(filter ...)" operations by
using "$(or ...)", not "$or".

Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
