changeset 13863:3972d90e0f77

3288 git-pbchk invents blank lines, then complains about them Reviewed by: Joshua M. Clulow <josh@sysmgr.org> Reviewed by: Gordon Ross <gwr@nexenta.com> Approved by: Dan McDonald <danmcd@nexenta.com>
author Richard Lowe <richlowe@richlowe.net>
date Thu, 18 Oct 2012 16:38:42 +0000
parents fd9b980efd06
children 2737b2ab1b9e
files usr/src/tools/scripts/git-pbchk.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/tools/scripts/git-pbchk.py	Wed Oct 17 06:40:09 2012 -0700
+++ b/usr/src/tools/scripts/git-pbchk.py	Thu Oct 18 16:38:42 2012 +0000
@@ -140,13 +140,13 @@
 def git_comments(parent):
     """Return a list of any checkin comments on this git branch"""
 
-    p = git('log --pretty=format:%%B %s..' % parent)
+    p = git('log --pretty=tformat:%%B:SEP: %s..' % parent)
 
     if not p:
         sys.stderr.write("Failed getting git comments\n")
         sys.exit(err)
 
-    return map(lambda x: x.strip(), p.readlines())
+    return [x.strip() for x in p.readlines() if x != ':SEP:\n']
 
 
 def git_file_list(parent, paths=None):