]> git.eshelyaron.com Git - emacs.git/commitdiff
New history variable for VC remote locations
authorSean Whitton <spwhitton@spwhitton.name>
Fri, 4 Jul 2025 10:38:38 +0000 (11:38 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 23 Jul 2025 20:16:18 +0000 (22:16 +0200)
* 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

index c13ad105fbf2e6689b58d07ee11c0ac680d15cd6..7ae54e6894cc92da193a39dd19e31bc21a16ec64 100644 (file)
@@ -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)