summaryrefslogtreecommitdiffstats
path: root/subcmds/diffmanifests.py
diff options
context:
space:
mode:
authorConnor Newton <connor@ifthenelse.io>2020-03-11 17:25:20 +0000
committerConnor Newton <connor@ifthenelse.io>2020-03-13 09:50:46 +0000
commit8b40c00eab2a08e99eb27f21ef286dd0af155a4a (patch)
tree627fcc220049756f6d959baf8c07123a5e1cce41 /subcmds/diffmanifests.py
parente20da3eeedf03dcffbb882ca10b159719f8e334d (diff)
downloadgit-repo-8b40c00eab2a08e99eb27f21ef286dd0af155a4a.tar.gz
diffmanifests: honour --pretty-format when printing --raw
Enable using --pretty-format to build a custom subject line even when using the --raw option. Change-Id: I0c1e682d984e56698fe65939aa6de12a653cd0f1 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/258565 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Connor Newton <connor@ifthenelse.io>
Diffstat (limited to 'subcmds/diffmanifests.py')
-rw-r--r--subcmds/diffmanifests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/subcmds/diffmanifests.py b/subcmds/diffmanifests.py
index 77f99df2..72c441ac 100644
--- a/subcmds/diffmanifests.py
+++ b/subcmds/diffmanifests.py
@@ -79,7 +79,7 @@ synced and their revisions won't be found.
79 metavar='<FORMAT>', 79 metavar='<FORMAT>',
80 help='print the log using a custom git pretty format string') 80 help='print the log using a custom git pretty format string')
81 81
82 def _printRawDiff(self, diff): 82 def _printRawDiff(self, diff, pretty_format=None):
83 for project in diff['added']: 83 for project in diff['added']:
84 self.printText("A %s %s" % (project.relpath, project.revisionExpr)) 84 self.printText("A %s %s" % (project.relpath, project.revisionExpr))
85 self.out.nl() 85 self.out.nl()
@@ -92,7 +92,7 @@ synced and their revisions won't be found.
92 self.printText("C %s %s %s" % (project.relpath, project.revisionExpr, 92 self.printText("C %s %s %s" % (project.relpath, project.revisionExpr,
93 otherProject.revisionExpr)) 93 otherProject.revisionExpr))
94 self.out.nl() 94 self.out.nl()
95 self._printLogs(project, otherProject, raw=True, color=False) 95 self._printLogs(project, otherProject, raw=True, color=False, pretty_format=pretty_format)
96 96
97 for project, otherProject in diff['unreachable']: 97 for project, otherProject in diff['unreachable']:
98 self.printText("U %s %s %s" % (project.relpath, project.revisionExpr, 98 self.printText("U %s %s %s" % (project.relpath, project.revisionExpr,
@@ -203,6 +203,6 @@ synced and their revisions won't be found.
203 203
204 diff = manifest1.projectsDiff(manifest2) 204 diff = manifest1.projectsDiff(manifest2)
205 if opt.raw: 205 if opt.raw:
206 self._printRawDiff(diff) 206 self._printRawDiff(diff, pretty_format=opt.pretty_format)
207 else: 207 else:
208 self._printDiff(diff, color=opt.color, pretty_format=opt.pretty_format) 208 self._printDiff(diff, color=opt.color, pretty_format=opt.pretty_format)