summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-05-01 22:45:59 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-31 06:46:08 -0700
commit7ffd692bfce78e8994e75698f0ecf3899624a9ab (patch)
tree403d476222e42849fcc2f1b3838254cf694d9e6b /tools
parent6d9f8909e5408da5a049957a13aa856fe98322d6 (diff)
downloadlinux-stable-7ffd692bfce78e8994e75698f0ecf3899624a9ab.tar.gz
linux-stable-7ffd692bfce78e8994e75698f0ecf3899624a9ab.tar.bz2
linux-stable-7ffd692bfce78e8994e75698f0ecf3899624a9ab.zip
bpftool: exclude bash-completion/bpftool from .gitignore pattern
[ Upstream commit a7d006714724de4334c5e3548701b33f7b12ca96 ] 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, from the point of .gitignore grammar, the following check-in file is also considered to be ignored: tools/bpf/bpftool/bash-completion/bpftool As the manual gitignore(5) says "Files already tracked by Git are not affected", this is not a problem as far as Git is concerned. However, Git is not the only program that parses .gitignore because .gitignore is useful to distinguish build artifacts from source files. For example, tar(1) supports the --exclude-vcs-ignore option. As of writing, this option does not work perfectly, but it intends to create a tarball excluding files specified by .gitignore. So, I believe it is better to fix this issue. You can fix it by prefixing the pattern with a slash; the leading slash means the specified pattern is relative to the current directory. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/bpf/bpftool/.gitignore2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/.gitignore b/tools/bpf/bpftool/.gitignore
index 67167e44b726..8248b8dd89d4 100644
--- a/tools/bpf/bpftool/.gitignore
+++ b/tools/bpf/bpftool/.gitignore
@@ -1,5 +1,5 @@
*.d
-bpftool
+/bpftool
bpftool*.8
bpf-helpers.*
FEATURE-DUMP.bpftool