From 40b688fc44762da090ad2cf055d35eaf45334250 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Fri, 14 Jun 2024 11:29:13 -0700 Subject: [PATCH] Suggest --no-thin based on error output I never remember in the moment how to resolve the occasional "Missing tree" error. Every time, I have to search and eventually rediscover https://storyboard.openstack.org/#!/story/1332549 and --no-thin. Now, on error check for the "Missing tree" message and suggest --no-thin if it wasn't already enabled. Change-Id: I7be68812b68f661219a6687fea54c48bc41adac8 --- git_review/cmd.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git_review/cmd.py b/git_review/cmd.py index 0b3104bd..ba156eec 100644 --- a/git_review/cmd.py +++ b/git_review/cmd.py @@ -1866,6 +1866,8 @@ additional information: else: (status, output) = run_command_status(cmd) print(output) + if status == 1 and 'Missing tree' in output and not options.no_thin: + print('Consider trying again with --no-thin') if options.finish and not options.dry and status == 0: finish_branch(branch)