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

Re: [PATCH 1/2] check-headers: add header usage checks for .c files

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 15, 2014, 19:14 UTC
Message-ID
<xmqqr3zc66ho.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1410680445-84593-1-git-send-email-davvid@gmail.com>
David Aguilar <davvid@gmail.com> writes:
> +check_header_usage () {
> +	first=$(grep '^#include' "$1" |
> +		head -n1 |
> +		sed -e 's,#include ",,' -e 's,"$,,')
perhaps a single "sed" invocation suffices?
	sed -n -e '/^#include/{
        	s/#include ["<]\(.*\)".*/\1/p
                q
	}' "$1"
Previous: David AguilarNext: Junio C Hamano
Message 3 of 6 in “check-headers: add header usage checks for .c files”
  1. 1/2 check-headers: add header usage checks for .c filesDavid Aguilar, Sep 14, 2014
  2. 2/2 cleanups: ensure that git-compat-util.h is included firstDavid Aguilar, Sep 14, 2014
  3. Junio C HamanoSep 15, 2014
  4. Junio C HamanoSep 15, 2014
  5. Junio C HamanoSep 15, 2014
  6. David AguilarSep 15, 2014

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.