Commit
753e4572d updated the parser to consider additional header lines
when deciding where a patch message ends and the diff begins. However,
these additional lines were not captured meaning these patches didn't
have a diff associated with them and they therefore weren't patches in
the Patchwork sense of the term. Correct this and add a test.
Signed-off-by: Stephen Finucane <stephen@that.guru>
else:
state = 5
elif state == 6:
- if line.startswith(('rename to ', 'rename from ',
+ # extended header lines
+ # @see https://git-scm.com/docs/git-diff#_generating_patches_with_p
+ if line.startswith(('old mode ', 'new mode ',
+ 'deleted file mode ',
+ 'new file mode ',
+ 'copy from ', 'copy to ',
+ 'rename from ', 'rename to ',
+ 'similarity index ',
+ 'dissimilarity index ',
'new file mode ', 'index ')):
patchbuf += buf + line
buf = ''
--- /dev/null
+From linux-kbuild Sun Apr 07 23:09:09 2019
+From: Petr Vorel <pvorel@suse.cz>
+Date: Sun, 07 Apr 2019 23:09:09 +0000
+To: linux-kbuild
+Subject: [PATCH 1/1] kconfig: Make nconf-cfg.sh executable
+Message-Id: <20190407230909.20668-1-pvorel@suse.cz>
+X-MARC-Message: https://marc.info/?l=linux-kbuild&m=155467856208923
+
+Although it's not required for the build *conf-cfg.sh scripts to be
+executable (they're run by CONFIG_SHELL), let's be consistent with other
+scripts.
+
+Signed-off-by: Petr Vorel <pvorel@suse.cz>
+---
+ scripts/kconfig/nconf-cfg.sh | 0
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ mode change 100644 => 100755 scripts/kconfig/nconf-cfg.sh
+
+diff --git a/scripts/kconfig/nconf-cfg.sh b/scripts/kconfig/nconf-cfg.sh
+old mode 100644
+new mode 100755
+--
+2.20.1
self.assertTrue(diff is not None)
self.assertTrue(message is not None)
+ def test_git_mode_change(self):
+ diff, message = self._find_content('0022-git-mode-change.mbox')
+ self.assertTrue(diff is not None)
+ self.assertTrue(message is not None)
+
def test_cvs_format(self):
diff, message = self._find_content('0007-cvs-format-diff.mbox')
self.assertTrue(diff.startswith('Index'))