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

[PATCH 4/4] Makefile: exclude contrib from FIND_SOURCE_FILES

From
Jeff King <peff@peff.net>
Date
Dec 14, 2016, 14:32 UTC
Message-ID
<20161214143234.pvtvn456ijltvueu@sigill.intra.peff.net>
In-Reply-To
<20161214142533.svktxk63eiwaaeor@sigill.intra.peff.net>

When you're working on the git project, you're unlikely to care about random bits in contrib/ (e.g., you would not want to jump to the copy of xmalloc in the wincred credential helper). Nobody has really complained because there are relatively few C files in contrib.

Now that we're matching shell scripts, too, we get quite a few more hits, especially in the obsolete contrib/examples directory. Looking for usage() should turn up the one in git-sh-setup, not in some long-dead version of git-clone.

Let's just exclude all of contrib. Any specific projects there which are big enough to want tags can generate them separately.

Signed-off-by: Jeff King <peff@peff.net>
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/Makefile b/Makefile
index ef8de4a75..76267262c 100644
--- a/Makefile
+++ b/Makefile
@@ -2154,10 +2154,12 @@ FIND_SOURCE_FILES = ( \
 		'*.[hcS]' \
 		'*.sh' \
 		':!*[tp][0-9][0-9][0-9][0-9]*' \
+		':!contrib' \
 		2>/dev/null || \
 	$(FIND) . \
 		\( -name .git -type d -prune \) \
 		-o \( -name '[tp][0-9][0-9][0-9][0-9]*' -prune \) \
+		-o \( -name contrib -type d -prune \) \
 		-o \( -name build -type d -prune \) \
 		-o \( -name 'trash*' -type d -prune \) \
 		-o \( -name '*.[hcS]' -type f -print \) \
-- 
2.11.0.341.g202cd3142
Previous: Jeff King
Message 5 of 5 in “"make tags" improvements”
  1. 0/4 "make tags" improvementsJeff King, Dec 14, 2016
  2. 1/4 Makefile: reformat FIND_SOURCE_FILESJeff King, Dec 14, 2016
  3. 2/4 Makefile: exclude test cruft from FIND_SOURCE_FILESJeff King, Dec 14, 2016
  4. 3/4 Makefile: match shell scripts in FIND_SOURCE_FILESJeff King, Dec 14, 2016
  5. 4/4 Makefile: exclude contrib from FIND_SOURCE_FILESJeff King, Dec 14, 2016

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.