[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ec1d2c14-ae27-38c7-9b79-4e323161d6f5@netronome.com>
Date: Mon, 29 Apr 2019 16:32:25 +0100
From: Quentin Monnet <quentin.monnet@...ronome.com>
To: Masahiro Yamada <yamada.masahiro@...ionext.com>,
Daniel Borkmann <daniel@...earbox.net>
Cc: Sirio Balmelli <sirio@...d.ch>, Song Liu <songliubraving@...com>,
Alexei Starovoitov <ast@...nel.org>, netdev@...r.kernel.org,
Yonghong Song <yhs@...com>,
Taeung Song <treeze.taeung@...il.com>,
linux-kernel@...r.kernel.org,
Jakub Kicinski <jakub.kicinski@...ronome.com>,
Martin KaFai Lau <kafai@...com>, bpf@...r.kernel.org
Subject: Re: [PATCH] bpftool: exclude bash-completion/bpftool from .gitignore
pattern
2019-04-29 23:47 UTC+0900 ~ Masahiro Yamada <yamada.masahiro@...ionext.com>
> tools/bpf/bpftool/.gitignore has the "bpftool" pattern, which is
> intended to ignore the following build artifact:
>
> tools/bpf/bpftool/bpftool
>
> However, the .gitignore entry is effective not only for the current
> directory, but also for any sub-directories.
>
> So, the following file is also considered to be ignored:
>
> tools/bpf/bpftool/bash-completion/bpftool
>
> It is obviously version-controlled, so should be excluded from the
> .gitignore pattern.
>
> You can fix it by prefixing the pattern with '/', which means it is
> only effective in the current directory.
>
> I prefixed the other patterns consistently. IMHO, '/' prefixing is
> safer when you intend to ignore specific files.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
> ---
Hi,
“Files already tracked by Git are not affected” by the .gitignore (says
the relevant man page), so bash completion file is not ignored. It would
be if we were to add the sources to the index of a new Git repo. But
sure, it does not cost much to make the .gitignore cleaner.
>
> tools/bpf/bpftool/.gitignore | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/bpf/bpftool/.gitignore b/tools/bpf/bpftool/.gitignore
> index 67167e4..19efcc8 100644
> --- a/tools/bpf/bpftool/.gitignore
> +++ b/tools/bpf/bpftool/.gitignore
> @@ -1,5 +1,5 @@
> *.d
> -bpftool
> -bpftool*.8
> -bpf-helpers.*
> -FEATURE-DUMP.bpftool
> +/bpftool
> +/bpftool*.8
> +/bpf-helpers.*
Careful when you add all those slashes, however. "bpftool*.8" and
"bpf-helpers.*" should match files under Documentation/, so you do NOT
want to prefix them with just a "/".
Quentin
> +/FEATURE-DUMP.bpftool
>
Powered by blists - more mailing lists