Strip trailing empty lines when getting footers
Take the following git change description (Note: added ~ to avoid having these lines be parsed as tags): ``` ~Test ~ ~Bug: something ~Change-Id: Something ``` Sometimes(?) `git log --pretty=format:%B%n <hash>..` returns: ``` ~Test ~ ~Bug: something ~Change-Id: Something ``` The trailing empty line trips split_footers() up, making it return an empty footer. This change removes trailing empty lines before processing them. Bug: 1130601 Change-Id: Ib8d6c37ad6817a47a744245d1a2455ac9af6c469 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2422378 Commit-Queue: Dirk Pranke <dpranke@google.com> Reviewed-by:Dirk Pranke <dpranke@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Showing
Please
register
or
sign in
to comment