git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Ramsay Jones <ramsay@ramsayjones.plus.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH 1/1] Makefile: use `git ls-files` to list header files, if possible
Date: Wed, 06 Mar 2019 14:28:01 +0900	[thread overview]
Message-ID: <xmqqd0n4r2qm.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190306044006.GA6664@sigill.intra.peff.net> (Jeff King's message of "Tue, 5 Mar 2019 23:40:06 -0500")

Jeff King <peff@peff.net> writes:

> On Wed, Mar 06, 2019 at 12:23:20AM +0000, Ramsay Jones wrote:
>
>> > Yeah, that's what I was hinting at earlier in the thread. Here it is
>> > sketched out to an actual working patch. The sub-make bits could
>> > actually be a shell script instead of a Makefile; the only point in
>> > using make is to use the parent "-j" for parallelism.
>> 
>> sigh. :(
>> 
>> I wish my patch removing this target had been picked up now!
>> 
>> Earlier this evening I spent an hour or so writing an email which
>> tried to discourage spending any time on this, because of the
>> potential for this to be a huge time-suck. An unrewarding one at
>> that! :-D
>
> Heh. I am OK with removing it, too.

FWIW, I am fine with that plan as well.

> My thinking earlier in the thread was that it should go in our bag of
> linting tools that people should generally run. But actually, it is kind
> of expensive to run, and it does not actually help anything immediately
> in practice. I.e., what we really care about is that the C source files
> compile, and running "make" does that (and especially running it on
> various platforms). This is just checking for a _potential_ problem if
> somebody were to include a particular header file at the start of
> another C file.
>
> So it's really about 2 steps removed from stopping an actual problem.

Yeah, exactly.

> diff --git a/compat/bswap.h b/compat/bswap.h
> index 5078ce5ecc..e4e25735ce 100644
> --- a/compat/bswap.h
> +++ b/compat/bswap.h
> @@ -1,3 +1,6 @@
> +#ifndef COMPAT_BSWAP_H
> +#define COMPAT_BSWAP_H
> +
>  /*
>   * Let's make sure we always have a sane definition for ntohl()/htonl().
>   * Some libraries define those as a function call, just to perform byte
> @@ -210,3 +213,5 @@ static inline void put_be64(void *ptr, uint64_t value)
>  }
>  
>  #endif
> +
> +#endif /* COMPAT_BSWAP_H */

This probably is worth having as an independent clean-up.

  reply	other threads:[~2019-03-06  5:28 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-01 19:57 [PATCH 0/1] Avoid calling find in the Makefile, if possible Johannes Schindelin via GitGitGadget
2019-03-01 19:57 ` [PATCH 1/1] Makefile: use `git ls-files` to list header files, " Johannes Schindelin via GitGitGadget
2019-03-01 21:36   ` Jeff King
2019-03-01 21:54     ` Jeff King
2019-03-01 22:01       ` Jeff King
2019-03-02 19:54         ` Johannes Schindelin
2019-03-03 17:08           ` Jeff King
2019-03-02 19:57       ` Johannes Schindelin
2019-03-03 17:11         ` Jeff King
2019-03-02 20:05     ` Johannes Schindelin
2019-03-03 17:19       ` Jeff King
2019-03-03 21:30         ` Ramsay Jones
2019-03-04 12:38           ` Johannes Schindelin
2019-03-04 20:31             ` Ramsay Jones
2019-03-04 21:37             ` Jeff King
2019-03-04 11:08         ` Johannes Schindelin
2019-03-04 21:41           ` Jeff King
2019-03-05  5:50             ` Junio C Hamano
2019-03-05 15:28               ` Johannes Schindelin
2019-03-05 22:26                 ` Junio C Hamano
2019-03-05 23:07               ` Jeff King
2019-03-06  0:23                 ` Ramsay Jones
2019-03-06  4:40                   ` Jeff King
2019-03-06  5:28                     ` Junio C Hamano [this message]
2019-03-06 19:05                       ` [PATCH] compat/bswap: add include header guards Jeff King
2019-03-06 22:42                         ` Junio C Hamano
2019-03-04 13:47 ` [PATCH v2 0/1] Avoid calling find in the Makefile, if possible Johannes Schindelin via GitGitGadget
2019-03-04 13:47   ` [PATCH v2 1/1] Makefile: use `git ls-files` to list header files, " Johannes Schindelin via GitGitGadget
2019-03-04 20:38     ` Ramsay Jones
2019-03-04 21:01       ` Ramsay Jones
2019-03-04 21:43     ` Jeff King

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=xmqqd0n4r2qm.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=peff@peff.net \
    --cc=ramsay@ramsayjones.plus.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).