]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
patman: When no tracking branch is provided, tell the user
authorNicolas Boichat <drinkcat@chromium.org>
Mon, 13 Jul 2020 02:50:01 +0000 (10:50 +0800)
committerSimon Glass <sjg@chromium.org>
Mon, 20 Jul 2020 17:37:47 +0000 (11:37 -0600)
The user can either count the number of patches, or provide a
tracking branch.

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
tools/patman/control.py

index 8f4afeab1884aa9f3402175db2036c7e5601b4ac..67e8f397efd4c2c0d2aceccd0dfba115ccf6a214 100644 (file)
@@ -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