lib: add warning when prefix doesn't match tree

Sometimes one lacks sleep and accidentally applies a patch
to the wrong tree. In case such hypothetical person names
their directories by the tree name (git's default when cloning)
we can try to help out and match the tree name to current dir.

Print a red warning when current directory is a well known tree
name, and the patch has been tagged with a well known tree name
but they don't match. Recognize net and bpf with an optional
"-next" suffix.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 file changed