diff mbox series

gitignore: ignore clangd .cache directory

Message ID 20230804171328.1737188-1-sandals@crustytoothpaste.net (mailing list archive)
State Accepted
Commit a5c01603b397f7f99b013a1334e0792d70be641c
Headers show
Series gitignore: ignore clangd .cache directory | expand

Commit Message

brian m. carlson Aug. 4, 2023, 5:13 p.m. UTC
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(+)

Comments

Junio C Hamano Aug. 4, 2023, 5:56 p.m. UTC | #1
"brian m. carlson" <sandals@crustytoothpaste.net> writes:

> 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.

> 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
diff mbox series

Patch

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