All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: Seyi Kuforiji <kuforiji98@gmail.com>,
	 ps@pks.im, phillip.wood@dunelm.org.uk
Subject: Re: [PATCH v3 06/10] t/unit-tests: convert reftable table test to use clar
Date: Tue, 03 Jun 2025 12:12:35 -0700	[thread overview]
Message-ID: <xmqqbjr4iqqk.fsf@gitster.g> (raw)
In-Reply-To: <xmqq7c1uszu6.fsf@gitster.g> (Junio C. Hamano's message of "Mon, 02 Jun 2025 12:33:37 -0700")

Junio C Hamano <gitster@pobox.com> writes:

>> 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'

  parent reply	other threads:[~2025-06-03 19:12 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-02 12:25 [PATCH v3 00/10] t/unit-tests: convert unit-tests to use clar Seyi Kuforiji
2025-06-02 12:25 ` [PATCH v3 01/10] t/unit-tests: implement clar specific reftable test helper functions Seyi Kuforiji
2025-06-02 13:23   ` Kristoffer Haugsbakk
2025-06-02 12:25 ` [PATCH v3 02/10] t/unit-tests: convert reftable basics test to use clar test framework Seyi Kuforiji
2025-06-03 13:51   ` Patrick Steinhardt
2025-06-03 14:03     ` Seyi Kuforiji
2025-06-03 14:14       ` Patrick Steinhardt
2025-06-02 12:25 ` [PATCH v3 03/10] t/unit-tests: convert reftable block test to use clar Seyi Kuforiji
2025-06-03 14:18   ` Patrick Steinhardt
2025-06-02 12:25 ` [PATCH v3 04/10] t/unit-tests: convert reftable merged " Seyi Kuforiji
2025-06-02 12:25 ` [PATCH v3 05/10] t/unit-tests: convert reftable pq " Seyi Kuforiji
2025-06-02 12:25 ` [PATCH v3 06/10] t/unit-tests: convert reftable table " Seyi Kuforiji
2025-06-02 19:33   ` Junio C Hamano
2025-06-03 11:46     ` Seyi Kuforiji
2025-06-03 19:12     ` Junio C Hamano [this message]
2025-06-02 12:25 ` [PATCH v3 07/10] t/unit-tests: convert reftable readwrite " Seyi Kuforiji
2025-06-02 12:25 ` [PATCH v3 08/10] t/unit-tests: convert reftable record " Seyi Kuforiji
2025-06-02 12:25 ` [PATCH v3 09/10] t/unit-tests: convert reftable stack " Seyi Kuforiji
2025-06-02 12:25 ` [PATCH v3 10/10] t/unit-tests: finalize migration of reftable-related tests Seyi Kuforiji
2025-06-03 13:51   ` Patrick Steinhardt
2025-06-05 12:56     ` Seyi Kuforiji
2025-06-05 13:24       ` Patrick Steinhardt
2025-06-05 16:56         ` Junio C Hamano
2025-06-03 18:41 ` [PATCH v3 00/10] t/unit-tests: convert unit-tests to use clar Junio C Hamano
2025-06-04 10:09   ` Seyi Kuforiji
2025-06-04 10:09   ` Seyi Kuforiji

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqbjr4iqqk.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=kuforiji98@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=ps@pks.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.