[PATCH] .gitignore: Add *.patch

Viresh Kumar posted 1 patch 1 year, 7 months ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/cd8683878852a55f1b28807a470e078d21a5e689.1662545140.git.viresh.kumar@linaro.org
.gitignore | 1 +
1 file changed, 1 insertion(+)
[PATCH] .gitignore: Add *.patch
Posted by Viresh Kumar 1 year, 7 months ago
Add *.patch entry to .gitignore file to stop showing git generated
patches in commands like 'git status'.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 9f9f18c97d5f..d9a4fd038145 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,6 +20,7 @@
 *.gcno
 *.gcda
 *.py[ocd]
+*.patch
 TAGS
 GTAGS
 GRTAGS
-- 
2.31.1.272.g89b43f80a514
Re: [PATCH] .gitignore: Add *.patch
Posted by Juergen Gross 1 year, 7 months ago
On 07.09.22 12:05, Viresh Kumar wrote:
> Add *.patch entry to .gitignore file to stop showing git generated
> patches in commands like 'git status'.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>   .gitignore | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/.gitignore b/.gitignore
> index 9f9f18c97d5f..d9a4fd038145 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -20,6 +20,7 @@
>   *.gcno
>   *.gcda
>   *.py[ocd]
> +*.patch
>   TAGS
>   GTAGS
>   GRTAGS

NAK.

We have some files named *.patch in our tree (e.g. stubdom/polarssl.patch).


Juergen
Re: [PATCH] .gitignore: Add *.patch
Posted by Andrew Cooper 1 year, 7 months ago
On 07/09/2022 11:09, Juergen Gross wrote:
> On 07.09.22 12:05, Viresh Kumar wrote:
>> Add *.patch entry to .gitignore file to stop showing git generated
>> patches in commands like 'git status'.
>>
>> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
>> ---
>>   .gitignore | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/.gitignore b/.gitignore
>> index 9f9f18c97d5f..d9a4fd038145 100644
>> --- a/.gitignore
>> +++ b/.gitignore
>> @@ -20,6 +20,7 @@
>>   *.gcno
>>   *.gcda
>>   *.py[ocd]
>> +*.patch
>>   TAGS
>>   GTAGS
>>   GRTAGS
>
> NAK.
>
> We have some files named *.patch in our tree (e.g.
> stubdom/polarssl.patch).

Agreed, and some future usecases wanting to add new patches
(livepatch-build-tools and livepatching testing).

Viresh: If you want to hide patches, you can add it to your local
.git/info/exclude file, but it is better to get into the habit of
maintaining a clean working tree.

~Andrew
Re: [PATCH] .gitignore: Add *.patch
Posted by Viresh Kumar 1 year, 7 months ago
On 07-09-22, 12:09, Juergen Gross wrote:
> On 07.09.22 12:05, Viresh Kumar wrote:
> > Add *.patch entry to .gitignore file to stop showing git generated
> > patches in commands like 'git status'.
> > 
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > ---
> >   .gitignore | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/.gitignore b/.gitignore
> > index 9f9f18c97d5f..d9a4fd038145 100644
> > --- a/.gitignore
> > +++ b/.gitignore
> > @@ -20,6 +20,7 @@
> >   *.gcno
> >   *.gcda
> >   *.py[ocd]
> > +*.patch
> >   TAGS
> >   GTAGS
> >   GRTAGS
> 
> NAK.
> 
> We have some files named *.patch in our tree (e.g. stubdom/polarssl.patch).

Ahh, I missed that :(

Will it be acceptable to have something like this then to just ignore the
patches ?

[0-9]*-*.patch

-- 
viresh