summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2016-08-08 16:55:06 +0100
committerThibault Saunier <tsaunier@gnome.org>2016-08-09 14:37:42 -0400
commitf1e30b0e696311cf1c31efe50f7c71d97d1b0f85 (patch)
tree9c39bbbf89379ae4a6849cf8ab5cbaaafa5b4cf7
parent80f3b4c34f442d737c376f18a15b9388dcbb3aed (diff)
git-phab: Only match blacklisted headers at the start of lines
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 <philip.withnall@collabora.co.uk> Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1256
-rwxr-xr-xgit-phab2
1 files changed, 1 insertions, 1 deletions
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 <enter>: """ % self.phabricator_uri)
663 663
664 for header in blacklist: 664 for header in blacklist:
665 header_ = header[:-1] + '_:' 665 header_ = header[:-1] + '_:'
666 f = re.sub(re.escape(header), header_, field, flags=re.I) 666 f = re.sub('^' + re.escape(header), header_, field, flags=re.I)
667 if (f != field) and ( 667 if (f != field) and (
668 not ask or self.prompt( 668 not ask or self.prompt(
669 "Commit message contains '%s'.\n" 669 "Commit message contains '%s'.\n"