Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: git_footers.py

Issue 1812803002: Gerrit git cl: fix change-id appending. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: nit Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/git_footers_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_footers.py
diff --git a/git_footers.py b/git_footers.py
index 1d4d4dd84099e5dcc95e78eb0870c10af3c437ae..4641f7470f551babbe8edb1938c21676e320f20d 100755
--- a/git_footers.py
+++ b/git_footers.py
@@ -83,9 +83,13 @@ def add_footer_change_id(message, change_id):
if line == '' or line.isspace():
break
footer_lines.append(line)
+ else:
+ # The whole description was consisting of footers,
+ # which means those aren't footers.
+ footer_lines = []
# footers order is from end to start of the message.
footers = map(parse_footer, footer_lines)
- if not all(footers):
+ if not footers or not all(footers):
lines.append('')
lines.append(change_id_line)
else:
« no previous file with comments | « no previous file | tests/git_footers_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698