checkpatch: refine mode selection
commit777d05ba477dde63a097ad12f1bb286f6ab7c4cc
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 4 Oct 2017 14:35:53 +0000 (4 16:35 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 12 Oct 2017 10:10:37 +0000 (12 12:10 +0200)
tree6fa08f571aedd2a1b927ce4578fe602c7db65776
parenta0b261db8c030813e30a39eae47359ac2a37f7e2
checkpatch: refine mode selection

stgit produces patch files that lack the ".patch" extensions.  Others
might be using ".diff" too.  But since we are already limiting source files
to only a handful of extensions, we can reuse that in the mode selection
code.

While at it, do not match "../foo" as a branch name.

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/checkpatch.pl