From f1e30b0e696311cf1c31efe50f7c71d97d1b0f85 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 8 Aug 2016 16:55:06 +0100 Subject: git-phab: Only match blacklisted headers at the start of lines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s fine for commit messages to contain ‘tests:’ in the middle of the line; Phabricator only checks for headers at the start of lines. Signed-off-by: Philip Withnall Reviewed-by: Thibault Saunier Differential Revision: https://phabricator.freedesktop.org/D1256 --- git-phab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-phab b/git-phab index 6774541..a920716 100755 --- a/git-phab +++ b/git-phab @@ -663,7 +663,7 @@ Paste API Token from that page and press : """ % self.phabricator_uri) for header in blacklist: header_ = header[:-1] + '_:' - f = re.sub(re.escape(header), header_, field, flags=re.I) + f = re.sub('^' + re.escape(header), header_, field, flags=re.I) if (f != field) and ( not ask or self.prompt( "Commit message contains '%s'.\n" -- cgit v1.2.3