From 4aa8584ec6a57b24c7e41e6fccd0b554a264423d Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 25 Jan 2022 02:10:28 -0500 Subject: init: make bad --repo-rev settings more clear If the user passes a bad --repo-rev setting in a new checkout, add a tip to the error message that their option is probably bad instead of just saying "unable to resolve". If the user has already initialized a checkout, we'd display a raw traceback which would confuse them. Swallow that and also include the --repo-rev tip. Bug: https://crbug.com/gerrit/15610 Change-Id: I5d72513c7b37bf9bb5d19862fcdfaf0d1f44e886 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/328820 Reviewed-by: Jack Neus Tested-by: Mike Frysinger --- repo | 1 + 1 file changed, 1 insertion(+) (limited to 'repo') diff --git a/repo b/repo index 2af77ace..6d7ce42a 100755 --- a/repo +++ b/repo @@ -618,6 +618,7 @@ def _Init(args, gitc_init=False): "REPO_URL set correctly?" % url, file=sys.stderr) except CloneFailure: + print('fatal: double check your --repo-rev setting.', file=sys.stderr) if opt.quiet: print('fatal: repo init failed; run without --quiet to see why', file=sys.stderr) -- cgit v1.2.3-54-g00ecf