[libcamera-devel] [PATCH] Added .cache directory to .gitignore under editors for clangd

Laurent Pinchart laurent.pinchart at ideasonboard.com
Sun Mar 28 00:16:07 CET 2021


Hey Abhay,

On Sat, Mar 27, 2021 at 11:25:44AM +0100, Sebastian Fricke wrote:
> On 27.03.2021 10:33, Abhay Raj Singh wrote:
> > Hello everyone! I am Abhay, I use NeoVim with coc.nvim using clangd which
> > generate .cache in the main folder, currently, there's no way to customize that
> > according to the issue https://github.com/clangd/coc-clangd/issues/50
> 
> That sounds like a very, very specific problem. Which probably won't be
> encountered by many libcamera developers.
> 
> > I am new to git over email, tbh this is my first patch. I followed a tut on
> > git-scm.com.
> > I drafted this using git send-email and am editing this in the Gmail draft.
> > I copied [libcamera-devel] from other emails, please do let me know
> > if did I something wrong and any better workflow.
> 
> So, this patch basically helps you as you don't have to see the `.cache`
> folder in the list of untracked files, but as I said above, I don't
> believe that too many other developers will encounter that issue. Which
> means, that we have to decide between adding 3 more lines to the
> `.gitignore` file for an issue, that will be encountered very rarely, or
> keeping the `.gitignore` file as minimal and clean as possible.
> 
> I would prefer to keep the `.gitignore` file tuned for the majority of
> use-cases. If you don't want to see that folder you could modify your
> local `.gitignore` file.
> 
> Please tell me if I missed something else, which would make this patch
> beneficial.

git looks for ignore patterns in multiple locations, as detailed by
`man gitignore`: $XDG_CONFIG_HOME/git/ignore, $GIT_DIR/info/exclude, and
.gitignore. For files created by your personal choices of tools, I
recommend to put ignore patterns in $XDG_CONFIG_HOME/git/ignore. They
will be taken into account for all your git repositories.

Note that if XDG_CONFIG_HOME isn't set, git assumes XDG_CONFIG_HOME to
be $HOME/.config.

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list