threads / patch / 60062

patchgitignore: ignore clangd .cache directory

Subject: [PATCH] gitignore: ignore clangd .cache directory

## tl;dr

2 messages between Aug 4, 2023 and Aug 4, 2023. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

brian m. carlson· Aug 4, 2023, 17:13 UTC · lore
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(+)
Show changes to .gitignore +1 −0
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
Junio C Hamano· Aug 4, 2023, 17:56 UTC · re: brian m. carlson · lore

Re: [PATCH] gitignore: ignore clangd .cache directory

"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 12 quoted lines
> 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.

Thanks. Let's fork from maint and queue it directly on 'next', and fast track it to the upcoming release.

Show 17 quoted lines
> 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

← back to recent threads