From c6b3a81da022950d8e703749f911c95c7de8d9d1 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 18 Feb 2023 16:48:36 -0500 Subject: [PATCH] fix(cli): recommend "checkout main" option if prompted In case straight prompts something like the following: > In repository "git-modes", HEAD on "master" is behind default branch "main" 1) Abort 2) Checkout "main" (Choose this if unsure) 3) Magit log "master..main" and open recursive edit --- lisp/cli/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/cli/packages.el b/lisp/cli/packages.el index 3026ee789..f9aa34884 100644 --- a/lisp/cli/packages.el +++ b/lisp/cli/packages.el @@ -690,7 +690,7 @@ If ELPA-P, include packages installed with package.el (M-x package-install)." ("^In repository \"[^\"]+\", [^ ]+ (on branch \"[^\"]+\") is ahead of default branch \"[^\"]+\"" . "^Checkout branch \"") ("^In repository " - . "^Reset branch \\|^Delete remote [^,]+, re-create it with correct URL")) + . "^Reset branch \\|^Delete remote [^,]+, re-create it with correct URL\\|^Checkout \"main\"")) "A list of regexps, mapped to regexps. Their CAR is tested against the prompt, and CDR is tested against the presented