[libcamera-devel] .gitignore: Add vim editor's swap files
diff mbox series

Message ID 20230124084301.33320-1-umang.jain@ideasonboard.com
State Rejected
Headers show
Series
  • [libcamera-devel] .gitignore: Add vim editor's swap files
Related show

Commit Message

Umang Jain Jan. 24, 2023, 8:43 a.m. UTC
Add *.swp files to .gitignore to prevent committing them accidently
to the tree.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

Comments

Laurent Pinchart Jan. 24, 2023, 10:28 a.m. UTC | #1
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@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__/
Umang Jain Jan. 24, 2023, 10:53 a.m. UTC | #2
Hi Laurent,

On 1/24/23 3:58 PM, Laurent Pinchart wrote:
> 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.

Didn't know this existed, that's great :-)
>
> 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 :-)

Ofcourse, makes sense!
>
>> Signed-off-by: Umang Jain <umang.jain@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__/

Patch
diff mbox series

diff --git a/.gitignore b/.gitignore
index f6d1d68e..809f9e45 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,4 +5,5 @@ 
 
 *.patch
 *.pyc
+*.swp
 __pycache__/