[libcamera-devel] [PATCH] .gitignore: Add vim editor's swap files

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Jan 24 11:28:55 CET 2023


Hi Umang,

Thank you for the patch.

On Tue, Jan 24, 2023 at 02:13:01PM +0530, Umang Jain via libcamera-devel wrote:
> Add *.swp files to .gitignore to prevent committing them accidently
> to the tree.

Quoting `man gitignore`,

  Patterns which a user wants Git to ignore in all situations (e.g.,
  backup or temporary files generated by the user’s editor of choice)
  generally go into a file specified by core.excludesFile in the user’s
  ~/.gitconfig. Its default value is $XDG_CONFIG_HOME/git/ignore. If
  $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/ignore
  is used instead.

I think it would make sense to handle your use case through that. While
I also use vim, I'd rather not open the door to dozens of
editor-specific ignore patterns in the libcamera .gitignore :-)

> Signed-off-by: Umang Jain <umang.jain at ideasonboard.com>
> ---
>  .gitignore | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/.gitignore b/.gitignore
> index f6d1d68e..809f9e45 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -5,4 +5,5 @@
>  
>  *.patch
>  *.pyc
> +*.swp
>  __pycache__/

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list