diff mbox

[i-g-t,v2] gitignore: Add files starting with .

Message ID 20170215182432.16408-1-michel.thierry@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michel Thierry Feb. 15, 2017, 6:24 p.m. UTC
I cant be the only one that have added .tags by mistake.

v2: Do not ignore .gitignore

Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Michel Thierry <michel.thierry@intel.com>
---
 .gitignore | 2 ++
 1 file changed, 2 insertions(+)

Comments

Petri Latvala Feb. 16, 2017, 9:26 a.m. UTC | #1
On 02/15/2017 08:24 PM, Michel Thierry wrote:
> I cant be the only one that have added .tags by mistake.
>
> v2: Do not ignore .gitignore
>
> Cc: Petri Latvala <petri.latvala@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
> ---
>   .gitignore | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/.gitignore b/.gitignore
> index 6204965a..4d5867a2 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -78,9 +78,11 @@ core
>   #		Edit the following section as needed
>   # For example, !report.pc overrides *.pc. See 'man gitignore'
>   #
> +!.gitignore
>   *.swo
>   *.swp
>   *.dirstamp
> +.*
>   cscope.*
>   TAGS
>   build-aux/

"!pattern" re-includes files excluded by _previous_ patterns. Reorder 
those changes so that .* is before !.gitignore.

For the record, that patch "works" for that particular source-root 
.gitignore file because it's already tracked by git and .gitignore only 
affects untracked files. The difference will only come up when adding a 
new .gitignore file in another directory.
diff mbox

Patch

diff --git a/.gitignore b/.gitignore
index 6204965a..4d5867a2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -78,9 +78,11 @@  core
 #		Edit the following section as needed
 # For example, !report.pc overrides *.pc. See 'man gitignore'
 #
+!.gitignore
 *.swo
 *.swp
 *.dirstamp
+.*
 cscope.*
 TAGS
 build-aux/