From f5adb9b24afed53bf89a35501590fccc5da0fa65 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 4 Jul 2025 11:38:38 +0100 Subject: [PATCH] New history variable for VC remote locations * lisp/vc/vc.el (vc-remote-location-history): New variable. (vc--maybe-read-remote-location): Use it. (cherry picked from commit 625a9f9bce77e47bd71d7f74e8011c716e0645cc) --- lisp/vc/vc.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index c13ad105fbf..7ae54e6894c 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -3289,9 +3289,13 @@ The command prompts for the branch whose change log to show." (list rootdir) branch t (when (> vc-log-show-limit 0) vc-log-show-limit)))) +(defvar vc-remote-location-history nil + "History for remote locations for VC incoming and outgoing commands.") + (defun vc--maybe-read-remote-location () (and current-prefix-arg - (list (read-string "Remote location/branch (empty for default): ")))) + (list (read-string "Remote location/branch (empty for default): " + 'vc-remote-location-history)))) (defun vc--incoming-revision (backend remote-location) (or (vc-call-backend backend 'incoming-revision remote-location) -- 2.39.5