[libcamera-devel,RFC,v3,3/5] gitignore: add .cache
diff mbox series

Message ID 20211209092906.37303-4-tomi.valkeinen@ideasonboard.com
State Superseded
Headers show
Series
  • Python bindings
Related show

Commit Message

Tomi Valkeinen Dec. 9, 2021, 9:29 a.m. UTC
clangd produces a .cache directory. Add it to .gitignore.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

Comments

Kieran Bingham Dec. 9, 2021, 9:48 a.m. UTC | #1
Quoting Tomi Valkeinen (2021-12-09 09:29:04)
> clangd produces a .cache directory. Add it to .gitignore.
> 

I don't use clangd (maybe I should?) so this sounds quite specific to
your use case, but I don't object to it. A '.cache' certainly shouldn't
ever get commited.


Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> ---
>  .gitignore | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/.gitignore b/.gitignore
> index d3d73615..cca829fa 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -5,3 +5,4 @@ build/
>  patches/
>  *.patch
>  *.pyc
> +.cache
> -- 
> 2.25.1
>
Laurent Pinchart Dec. 9, 2021, 4:56 p.m. UTC | #2
Hi Tomi,

Thank you for the patch.

On Thu, Dec 09, 2021 at 11:29:04AM +0200, Tomi Valkeinen wrote:
> clangd produces a .cache directory. Add it to .gitignore.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> ---
>  .gitignore | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/.gitignore b/.gitignore
> index d3d73615..cca829fa 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -5,3 +5,4 @@ build/
>  patches/
>  *.patch
>  *.pyc
> +.cache

If this is a directory,

.cache/

could be better. Is the directory created at the top level only, or are
there multiple directories through the source tree ? In the first case,
/.cache/ could also be a better match (I'll submit a patch to turn
build/ and patches/ into /build/ and /patches/).

I'm not thrilled about adding ignore patterns related to third-party
tools, but I'm not opposed to it either. I however wonder if this use
case wouldn't be better supported by a /.cache/ pattern in
$XDG_CONFIG_HOME/git/ignore though, as that would allow you to use
clangd in all projects without adding a patch similar to this in all of
them. What do you think ?
Tomi Valkeinen Dec. 10, 2021, 11:44 a.m. UTC | #3
On 09/12/2021 18:56, Laurent Pinchart wrote:
> Hi Tomi,
> 
> Thank you for the patch.
> 
> On Thu, Dec 09, 2021 at 11:29:04AM +0200, Tomi Valkeinen wrote:
>> clangd produces a .cache directory. Add it to .gitignore.
>>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
>> ---
>>   .gitignore | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/.gitignore b/.gitignore
>> index d3d73615..cca829fa 100644
>> --- a/.gitignore
>> +++ b/.gitignore
>> @@ -5,3 +5,4 @@ build/
>>   patches/
>>   *.patch
>>   *.pyc
>> +.cache
> 
> If this is a directory,
> 
> .cache/
> 
> could be better. Is the directory created at the top level only, or are
> there multiple directories through the source tree ? In the first case,
> /.cache/ could also be a better match (I'll submit a patch to turn
> build/ and patches/ into /build/ and /patches/).
> 
> I'm not thrilled about adding ignore patterns related to third-party
> tools, but I'm not opposed to it either. I however wonder if this use
> case wouldn't be better supported by a /.cache/ pattern in
> $XDG_CONFIG_HOME/git/ignore though, as that would allow you to use
> clangd in all projects without adding a patch similar to this in all of
> them. What do you think ?

Yes, I can do that.

  Tomi

Patch
diff mbox series

diff --git a/.gitignore b/.gitignore
index d3d73615..cca829fa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@  build/
 patches/
 *.patch
 *.pyc
+.cache