From 43d4c923b31161ebfa1b9006a10ff3f55ed94671 Mon Sep 17 00:00:00 2001 From: Michal Domonkos Date: Thu, 14 Dec 2023 13:29:20 +0100 Subject: [PATCH] Minor fixes to git-cherry-plan --- devel_doc/git-cherry-plan | 7 ++++--- devel_doc/gitconfig | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/devel_doc/git-cherry-plan b/devel_doc/git-cherry-plan index da83fba..eeace13 100755 --- a/devel_doc/git-cherry-plan +++ b/devel_doc/git-cherry-plan @@ -90,7 +90,7 @@ class Plan(object): # Patterns for matching a commit line and the footer self.re_commit = re.compile( - '^(....) (.{{{abbrev}}}) (.+)$'.format(abbrev=self.abbrev)) + '^([^#]...) (.{{{abbrev}}}) (.+)$'.format(abbrev=self.abbrev)) self.re_footer = re.compile( '^# Rebase .{{{abbrev}}}\\.\\.'.format(abbrev=self.abbrev)) @@ -147,7 +147,7 @@ class Plan(object): # Parse a commit command, hash, subject = m.groups() if command not in COMMANDS: - raise UnknownCommandError(command) + raise UnknownCommandError(line) hash = rev_parse(hash, False) commit = Commit(COMMANDS[command], hash, subject, self.abbrev) @@ -365,7 +365,8 @@ FOOTER = ''' # # These lines MUST NOT be re-ordered; they are executed from top to bottom. # -# vim:syntax=gitrebase''' +# vim:syntax=gitrebase +''' # Map command markers in a plan file to the constants COMMANDS = { diff --git a/devel_doc/gitconfig b/devel_doc/gitconfig index 045d0ae..68af66b 100644 --- a/devel_doc/gitconfig +++ b/devel_doc/gitconfig @@ -1,5 +1,10 @@ [cherryPlan] backportPatterns = ^\\(backported from commit (.*)\\)$ + # The following are only here to match existing commits on rpm-4.18.x + backportPatterns = ^\\(backport of (.*)\\)$ + backportPatterns = ^Backported from commit (.*)$ + backportPatterns = ^\\(cherry pick of (.*)\\.\\)$ + backportPatterns = ^\\(cherry pick of commit (.*)\\)$ [cherryPlan "automark"] pick = test,documentation,build [changelog]