git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3 06/10] t/unit-tests: convert reftable table test to use clar

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 3, 2025, 19:12 UTC
Message-ID
<xmqqbjr4iqqk.fsf@gitster.g>
In-Reply-To
<xmqq7c1uszu6.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 16 quoted lines
>> diff --git a/Makefile b/Makefile
>> index 3cccc73073..0227fdb3e1 100644
>> --- a/Makefile
>> +++ b/Makefile
>> ...
>> @@ -3972,4 +3972,4 @@ $(LIBGIT_HIDDEN_EXPORT): $(LIBGIT_PARTIAL_EXPORT)
>>  	$(OBJCOPY) --localize-hidden $^ $@
>>  
>>  contrib/libgit-sys/libgitpub.a: $(LIBGIT_HIDDEN_EXPORT)
>> -	$(AR) $(ARFLAGS) $@ $^
>> +	$(AR) $(ARFLAGS) $@ $^
>> \ No newline at end of file
>
> Can anybody tell, without running "make <something>", what this
> accidental and unintended change breaks?  It may be rather
> surprising ;-)
After dropping the last newline from the top-level Makefile, 
    $ make check-docs
ends like this:
    $ make check-docs
    make -C Documentation lint-docs
    make[1]: Entering directory '/home/gitster/git.git/Documentation'
        GEN lint-docs-manpages
    removed but documented: git
    removed but documented: git-add
    ...
    removed but documented: git-write-tree
    removed but documented: scalar
    removed but listed: git-add
    removed but listed: git-am
    ...
    removed but listed: git-write-tree
    removed but listed: scalar
    make[1]: *** [Makefile:504: lint-docs-manpages] Error 1
    make[1]: Leaving directory '/home/gitster/git.git/Documentation'
    make: *** [Makefile:3829: check-docs] Error 2

This is because of a cute Makefile trick used in lint-manpages script is not written robustly enough, but that is not much less interesting than the lesson we learn from this episode.

A more robust and traditional way to use the same Makefile trick is to apply this patch to Documentation/lint-manpages.sh by the way.

 Documentation/lint-manpages.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git c/Documentation/lint-manpages.sh w/Documentation/lint-manpages.sh
index a0ea572382..65758a3159 100755
--- c/Documentation/lint-manpages.sh
+++ w/Documentation/lint-manpages.sh
@@ -2,11 +2,11 @@
 
 extract_variable () {
 	(
-		cat ../Makefile
 		cat <<EOF
 print_variable:
 	@\$(foreach b,\$($1),echo XXX \$(b:\$X=) YYY;)
 EOF
+		cat ../Makefile
 	) |
 	make -C .. -f - print_variable 2>/dev/null |
 	sed -n -e 's/.*XXX \(.*\) YYY.*/\1/p'
Previous: Seyi KuforijiNext: Seyi Kuforiji
Message 15 of 26 in “t/unit-tests: convert unit-tests to use clar”
  1. 00/10 t/unit-tests: convert unit-tests to use clarSeyi Kuforiji, Jun 2, 2025
  2. 01/10 t/unit-tests: implement clar specific reftable test helper functionsSeyi Kuforiji, Jun 2, 2025
  3. Kristoffer HaugsbakkJun 2, 2025
  4. 02/10 t/unit-tests: convert reftable basics test to use clar test frameworkSeyi Kuforiji, Jun 2, 2025
  5. Patrick SteinhardtJun 3, 2025
  6. Seyi KuforijiJun 3, 2025
  7. Patrick SteinhardtJun 3, 2025
  8. 03/10 t/unit-tests: convert reftable block test to use clarSeyi Kuforiji, Jun 2, 2025
  9. Patrick SteinhardtJun 3, 2025
  10. 04/10 t/unit-tests: convert reftable merged test to use clarSeyi Kuforiji, Jun 2, 2025
  11. 05/10 t/unit-tests: convert reftable pq test to use clarSeyi Kuforiji, Jun 2, 2025
  12. 06/10 t/unit-tests: convert reftable table test to use clarSeyi Kuforiji, Jun 2, 2025
  13. Junio C HamanoJun 2, 2025
  14. Seyi KuforijiJun 3, 2025
  15. Junio C HamanoJun 3, 2025
  16. 07/10 t/unit-tests: convert reftable readwrite test to use clarSeyi Kuforiji, Jun 2, 2025
  17. 08/10 t/unit-tests: convert reftable record test to use clarSeyi Kuforiji, Jun 2, 2025
  18. 09/10 t/unit-tests: convert reftable stack test to use clarSeyi Kuforiji, Jun 2, 2025
  19. 10/10 t/unit-tests: finalize migration of reftable-related testsSeyi Kuforiji, Jun 2, 2025
  20. Patrick SteinhardtJun 3, 2025
  21. Seyi KuforijiJun 5, 2025
  22. Patrick SteinhardtJun 5, 2025
  23. Junio C HamanoJun 5, 2025
  24. Junio C HamanoJun 3, 2025
  25. Seyi KuforijiJun 4, 2025
  26. Seyi KuforijiJun 4, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.