Update format of `git cl split`
This change updates the output format of `git cl split` when
`description_file` has no footers.
Bug: 1215852
Change-Id: I69764885337ec31134f2b5e2d861930e0bc8cd2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2936161
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Commit-Queue: Fangzhen Song <songfangzhen@bytedance.com>
diff --git a/split_cl.py b/split_cl.py
index 9c0bc77..f742360 100644
--- a/split_cl.py
+++ b/split_cl.py
@@ -60,7 +60,7 @@
"""
split_footers = git_footers.split_footers(description)
lines = split_footers[0]
- if not lines[-1] or lines[-1].isspace():
+ if lines[-1] and not lines[-1].isspace():
lines = lines + ['']
lines = lines + ['This CL was uploaded by git cl split.']
if split_footers[1]: