[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 05/74] checkpatch: fix filename detection when using
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 05/74] checkpatch: fix filename detection when using -f |
Date: |
Tue, 21 Aug 2018 19:01:37 +0200 |
Fix $realfile filename when using -f/--file to not remove first level
directory as if the filename was used in a -P1 patch. Only strip the
first level directory (typically a or b) for P1 patches.
Signed-off-by: Joe Perches <address@hidden>
Signed-off-by: Andrew Morton <address@hidden>
Signed-off-by: Linus Torvalds <address@hidden>
(extracted from Linux commit 2b7ab45395dc4d91ef30985f76d90a8f28f58c27)
Signed-off-by: Paolo Bonzini <address@hidden>
---
scripts/checkpatch.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 42e1c50..0553634 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1367,10 +1367,10 @@ sub process {
# extract the filename as it passes
if ($line =~ /^diff --git.*?(\S+)$/) {
$realfile = $1;
- $realfile =~ address@hidden([^/]*)/@@;
+ $realfile =~ address@hidden([^/]*)/@@ if (!$file);
} elsif ($line =~ /^\+\+\+\s+(\S+)/) {
$realfile = $1;
- $realfile =~ address@hidden([^/]*)/@@;
+ $realfile =~ address@hidden([^/]*)/@@ if (!$file);
$p1_prefix = $1;
if (!$file && $tree && $p1_prefix ne '' &&
--
1.8.3.1
- [Qemu-devel] [PULL 00/74] Misc patches for 2018-08-21, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 03/74] es1370: simplify MemoryRegionOps, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 10/74] tests/migration-test: Silence the kvm_hv message by default, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 04/74] fix "Missing break in switch" coverity reports, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 06/74] qemu-pr-helper: Fix build on CentOS 7, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 02/74] scsi: mptsas: Mark as storage device, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 05/74] checkpatch: fix filename detection when using -f,
Paolo Bonzini <=
- [Qemu-devel] [PULL 01/74] tests: virtio: separate ccw tests from libqos, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 09/74] MAINTAINERS: add maintainers for qtest, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 11/74] net: Silence 'has no peer' messages in testing mode, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 08/74] megasas: fix sglist leak, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 12/74] hw/timer/mc146818rtc: White space clean-up, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 07/74] chardev/char-fe: Fix typos, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 13/74] hw/timer/mc146818rtc: Fix introspection problem, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 15/74] tests/device-introspection: Check that the qom-tree and qtree do not change, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 14/74] tests: Skip old versioned machine types in quick testing mode, Paolo Bonzini, 2018/08/21
- [Qemu-devel] [PULL 24/74] vl: add -enable-sync-profile, Paolo Bonzini, 2018/08/21