summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2016-08-08 17:34:25 +0100
committerThibault Saunier <tsaunier@gnome.org>2016-08-09 14:37:45 -0400
commita42d52a20098860c367df07d83f85d1a555d6ed6 (patch)
treee7abf6c387c0b3fe01619ca8781b0f1681144902
parentf1e30b0e696311cf1c31efe50f7c71d97d1b0f85 (diff)
git-phab: Do not strip leading spaces from commit messages
Only strip leading newlines; otherwise commit messages which are a list of bullet points will end up with one space missing from the front of the first bullet point. Signed-off-by: Philip Withnall <philip.withnall@collabora.co.uk> Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1257
-rwxr-xr-xgit-phab4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-phab b/git-phab
index a920716..910a8c2 100755
--- a/git-phab
+++ b/git-phab
@@ -677,7 +677,7 @@ Paste API Token from that page and press <enter>: """ % self.phabricator_uri)
677 def format_commit_msg(self, subject, body, git_fields, phab_fields, 677 def format_commit_msg(self, subject, body, git_fields, phab_fields,
678 ask=False): 678 ask=False):
679 subject = subject.strip() 679 subject = subject.strip()
680 body = '\n'.join(body).strip() 680 body = '\n'.join(body).strip('\r\n')
681 fields = '\n'.join(git_fields + phab_fields).strip() 681 fields = '\n'.join(git_fields + phab_fields).strip()
682 682
683 subject = self.format_field(subject, ask) 683 subject = self.format_field(subject, ask)
@@ -989,7 +989,7 @@ Paste API Token from that page and press <enter>: """ % self.phabricator_uri)
989 989
990 phab_fields.append("Projects: %s" % ','.join(self.project_phids)) 990 phab_fields.append("Projects: %s" % ','.join(self.project_phids))
991 991
992 summary = ('\n'.join(body) + '\n' + '\n'.join(git_fields)).strip() 992 summary = ('\n'.join(body) + '\n' + '\n'.join(git_fields)).strip('\r\n')
993 993
994 revision_id = self.get_differential_id(self.repo.head.commit) 994 revision_id = self.get_differential_id(self.repo.head.commit)
995 if revision_id: 995 if revision_id: