From e1db5c9b08b81754c9467d0e515ce613dbab60f9 Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Mon, 13 Jul 2020 10:50:01 +0800 Subject: patman: When no tracking branch is provided, tell the user The user can either count the number of patches, or provide a tracking branch. Signed-off-by: Nicolas Boichat Reviewed-by: Simon Glass --- tools/patman/control.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/patman/control.py b/tools/patman/control.py index 8f4afeab18..67e8f397ef 100644 --- a/tools/patman/control.py +++ b/tools/patman/control.py @@ -48,8 +48,9 @@ def prepare_patches(col, branch, count, start, end, ignore_binary): count = (gitutil.CountCommitsToBranch(branch) - start) if not count: - sys.exit(col.Color(col.RED, - 'No commits found to process - please use -c flag')) + str = 'No commits found to process - please use -c flag, or run:\n' \ + ' git branch --set-upstream-to remote/branch' + sys.exit(col.Color(col.RED, str)) # Read the metadata from the commits to_do = count - end -- cgit v1.2.3