attr: drop DEBUG_ATTR code
commit69c5f17f11a2afe6b56b04f5a4377e4332858cde
authorJeff King <peff@peff.net>
Thu, 6 Oct 2022 13:23:19 +0000 (6 09:23 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 6 Oct 2022 16:59:17 +0000 (6 09:59 -0700)
treea1a822e23ebc0e63f0183b1dca1978108099404e
parent116761ba9cdee81e0d7b4671f14f9bd256f2cb36
attr: drop DEBUG_ATTR code

Since its inception in d0bfd026a8 (Add basic infrastructure to assign
attributes to paths, 2007-04-12), the attribute code carries a little
bit of debug code that is conditionally compiled only when DEBUG_ATTR is
set. But since you have to know about it and make a special build of Git
to use it, it's not clear that it's helping anyone (and there are very
few mentions of it on the list over the years).

Meanwhile, it causes slight headaches. Since it's not built as part of a
regular compile, it's subject to bitrot. E.g., this was dealt with in
712efb1a42 (attr: make it build with DEBUG_ATTR again, 2013-01-15), and
it currently fails to build with DEVELOPER=1 since e810e06357 (attr:
tighten const correctness with git_attr and match_attr, 2017-01-27).

And it causes confusion with -Wunused-parameter; the "what" parameter of
fill_one() is unused in a normal build, but needed in a debug build.

Let's just get rid of this code (and the now-useless parameter).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
attr.c