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

[PATCH] gitignore: ignore clangd .cache directory

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Aug 4, 2023, 17:13 UTC
Message-ID
<20230804171328.1737188-1-sandals@crustytoothpaste.net>
From: "brian m. carlson" <bk2204@github.com>

In at least some versions of clangd, including version 15 in Ubuntu 23.04, a directory, .cache, is written in the root of the repository with index information about the files in the repository. Since clangd is the most common language server protocol (LSP) implementation for C, and we already support it using the GENERATE_COMPILATION_DATABASE flags to make it functional, it's likely many users are using or will want to use it.

As a result, ignore the ".cache" directory to help avoid users accidentally committing the data.

Signed-off-by: brian m. carlson <bk2204@github.com>
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index e875c59054..5e56e471b3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -222,6 +222,7 @@
 /TAGS
 /cscope*
 /compile_commands.json
+/.cache/
 *.hcc
 *.obj
 *.lib
Next: Junio C Hamano
Message 1 of 2 in “gitignore: ignore clangd .cache directory”
  1. gitignore: ignore clangd .cache directorybrian m. carlson, Aug 4, 2023
  2. Junio C HamanoAug 4, 2023

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.