Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1428184 > unrolled thread

Re: [PATCH v2] scripts/gdb: add constants.py to .gitignore

Started byKieran Bingham <kieran@ksquared.org.uk>
First post2016-06-21 23:30 +0200
Last post2016-06-22 00:10 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2] scripts/gdb: add constants.py to .gitignore Kieran Bingham <kieran@ksquared.org.uk> - 2016-06-21 23:30 +0200
    Re: [PATCH v2] scripts/gdb: add constants.py to .gitignore Omar Sandoval <osandov@osandov.com> - 2016-06-21 23:40 +0200
      Re: [PATCH v2] scripts/gdb: add constants.py to .gitignore Kieran Bingham <kieran@ksquared.org.uk> - 2016-06-22 00:10 +0200
        Re: [PATCH v2] scripts/gdb: add constants.py to .gitignore Omar Sandoval <osandov@osandov.com> - 2016-06-22 00:10 +0200

#1428184 — Re: [PATCH v2] scripts/gdb: add constants.py to .gitignore

FromKieran Bingham <kieran@ksquared.org.uk>
Date2016-06-21 23:30 +0200
SubjectRe: [PATCH v2] scripts/gdb: add constants.py to .gitignore
Message-ID<rMBp7-2Kp-13@gated-at.bofh.it>
On 21/06/16 22:11, Omar Sandoval wrote:
> From: Omar Sandoval <osandov@fb.com>
> 
> Since scripts/gdb/linux/constants.py is autogenerated, this should have
> been added to .gitignore when it was introduced.
> 
> Fixes: f197d75fcad1 ("scripts/gdb: provide linux constants")
> Signed-off-by: Omar Sandoval <osandov@fb.com>
> ---
> Thanks, Kieran, I totally missed the comment in top-level .gitignore.
> 
>  scripts/gdb/linux/.gitignore | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/gdb/linux/.gitignore b/scripts/gdb/linux/.gitignore
> index 52e4e61140d1..d5abd6ce9425 100644
> --- a/scripts/gdb/linux/.gitignore
> +++ b/scripts/gdb/linux/.gitignore
> @@ -1,2 +1,3 @@
>  *.pyc
>  *.pyo
> +/constants.py

Does this work with '/' at the beginning of the line?
It looks like all the other sub-tree .gitignores don't use a leading /
on their ignores

If you're happy, I'd like to drop the leading '/'.

(I think I can do this silently as I pick the patch if you approve,
rather than send another patch for a one-byte change)

Other than that:

Signed-off-by: Kieran Bingham <kieran@bingham.xyz>
-- 
Regards

Kieran Bingham

[toc] | [next] | [standalone]


#1428195

FromOmar Sandoval <osandov@osandov.com>
Date2016-06-21 23:40 +0200
Message-ID<rMByN-2NM-1@gated-at.bofh.it>
In reply to#1428184
On Tue, Jun 21, 2016 at 10:20:14PM +0100, Kieran Bingham wrote:
> On 21/06/16 22:11, Omar Sandoval wrote:
> > From: Omar Sandoval <osandov@fb.com>
> > 
> > Since scripts/gdb/linux/constants.py is autogenerated, this should have
> > been added to .gitignore when it was introduced.
> > 
> > Fixes: f197d75fcad1 ("scripts/gdb: provide linux constants")
> > Signed-off-by: Omar Sandoval <osandov@fb.com>
> > ---
> > Thanks, Kieran, I totally missed the comment in top-level .gitignore.
> > 
> >  scripts/gdb/linux/.gitignore | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/scripts/gdb/linux/.gitignore b/scripts/gdb/linux/.gitignore
> > index 52e4e61140d1..d5abd6ce9425 100644
> > --- a/scripts/gdb/linux/.gitignore
> > +++ b/scripts/gdb/linux/.gitignore
> > @@ -1,2 +1,3 @@
> >  *.pyc
> >  *.pyo
> > +/constants.py
> 
> Does this work with '/' at the beginning of the line?
> It looks like all the other sub-tree .gitignores don't use a leading /
> on their ignores
> 
> If you're happy, I'd like to drop the leading '/'.
> 
> (I think I can do this silently as I pick the patch if you approve,
> rather than send another patch for a one-byte change)
> 
> Other than that:
> 
> Signed-off-by: Kieran Bingham <kieran@bingham.xyz>
> -- 
> Regards
> 
> Kieran Bingham

Yeah, it should still be relative to the path containing the .gitignore:

----
$ mkdir test
$ cd test
$ git init
Initialized empty Git repository in /tmp/test/.git/
$ mkdir foo
$ touch foo/bar
$ git add foo/bar
$ git commit -m "Initial commit"
[master (root-commit) c9075695cce0] Initial commit
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 foo/bar
$ touch asdf foo/asdf
$ git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        asdf
        foo/asdf

nothing added to commit but untracked files present (use "git add" to track)
$ echo "/asdf" > foo/.gitignore
$ git add foo/.gitignore
$ git commit -m "Test"
[master dc92ad57d7e8] Test
 1 file changed, 1 insertion(+)
 create mode 100644 foo/.gitignore
$ git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        asdf

nothing added to commit but untracked files present (use "git add" to track)
----

tools/thermal/tmon/.gitignore also uses the leading slash.

If you want to drop the /, I'm okay with it.

-- 
Omar

[toc] | [prev] | [next] | [standalone]


#1428219

FromKieran Bingham <kieran@ksquared.org.uk>
Date2016-06-22 00:10 +0200
Message-ID<rMC1Q-3dH-1@gated-at.bofh.it>
In reply to#1428195
On 21/06/16 22:34, Omar Sandoval wrote:
> $ git status
> On branch master
> Untracked files:
>   (use "git add <file>..." to include in what will be committed)
> 
>         asdf
> 
> nothing added to commit but untracked files present (use "git add" to track)
> ----
> 
> tools/thermal/tmon/.gitignore also uses the leading slash.

Aha yes,

find -name .gitignore -exec grep -Hin '^/' {} \;
./tools/thermal/tmon/.gitignore:1:/tmon
./.gitignore:44:/tags
./.gitignore:45:/TAGS
./.gitignore:46:/linux
./.gitignore:47:/vmlinux
./.gitignore:48:/vmlinux.32
./.gitignore:49:/vmlinux-gdb.py
./.gitignore:50:/vmlinuz
./.gitignore:51:/System.map
./.gitignore:52:/Module.markers
./.gitignore:57:/debian/
./.gitignore:62:/tar-install/

I think we'll call this the exception rather than the norm, and I'd
prefer to match the other 177 .gitignore files in their style.

> 
> If you want to drop the /, I'm okay with it.


Thanks for the testing, and checking.
Patch picked, and '/' silently dropped.

-- 
Regards

Kieran Bingham

[toc] | [prev] | [next] | [standalone]


#1428221

FromOmar Sandoval <osandov@osandov.com>
Date2016-06-22 00:10 +0200
Message-ID<rMC1Q-3dH-5@gated-at.bofh.it>
In reply to#1428219
On Tue, Jun 21, 2016 at 11:03:39PM +0100, Kieran Bingham wrote:
> On 21/06/16 22:34, Omar Sandoval wrote:
> > $ git status
> > On branch master
> > Untracked files:
> >   (use "git add <file>..." to include in what will be committed)
> > 
> >         asdf
> > 
> > nothing added to commit but untracked files present (use "git add" to track)
> > ----
> > 
> > tools/thermal/tmon/.gitignore also uses the leading slash.
> 
> Aha yes,
> 
> find -name .gitignore -exec grep -Hin '^/' {} \;
> ./tools/thermal/tmon/.gitignore:1:/tmon
> ./.gitignore:44:/tags
> ./.gitignore:45:/TAGS
> ./.gitignore:46:/linux
> ./.gitignore:47:/vmlinux
> ./.gitignore:48:/vmlinux.32
> ./.gitignore:49:/vmlinux-gdb.py
> ./.gitignore:50:/vmlinuz
> ./.gitignore:51:/System.map
> ./.gitignore:52:/Module.markers
> ./.gitignore:57:/debian/
> ./.gitignore:62:/tar-install/
> 
> I think we'll call this the exception rather than the norm, and I'd
> prefer to match the other 177 .gitignore files in their style.
> 
> > 
> > If you want to drop the /, I'm okay with it.
> 
> 
> Thanks for the testing, and checking.
> Patch picked, and '/' silently dropped.

Sounds good, thanks!

-- 
Omar

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web