public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Omar Sandoval <osandov@osandov.com>
To: Kieran Bingham <kieran@ksquared.org.uk>
Cc: Jan Kiszka <jan.kiszka@siemens.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] scripts/gdb: add constants.py to .gitignore
Date: Tue, 21 Jun 2016 14:34:41 -0700	[thread overview]
Message-ID: <20160621213441.GA12969@vader.DHCP.thefacebook.com> (raw)
In-Reply-To: <5769AF8E.8040807@bingham.xyz>

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

  reply	other threads:[~2016-06-21 21:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21 21:11 [PATCH v2] scripts/gdb: add constants.py to .gitignore Omar Sandoval
2016-06-21 21:20 ` Kieran Bingham
2016-06-21 21:34   ` Omar Sandoval [this message]
2016-06-21 22:03     ` Kieran Bingham
2016-06-21 22:05       ` Omar Sandoval

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160621213441.GA12969@vader.DHCP.thefacebook.com \
    --to=osandov@osandov.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kieran@ksquared.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox