]> git.eshelyaron.com Git - emacs.git/commitdiff
Factor out vc-async-checkin-backends
authorSean Whitton <spwhitton@spwhitton.name>
Thu, 29 May 2025 11:41:36 +0000 (12:41 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sat, 7 Jun 2025 19:53:09 +0000 (21:53 +0200)
This allows third party backends to indicate they support async
checkins.

* lisp/vc/vc.el (vc-async-checkin-backends): New variable.
(vc-checkin): Use it.

(cherry picked from commit 6519fb5d2b22ec571de1d09095df4ad30345e988)

lisp/vc/vc.el

index 6292d76add773d31ec56e6240c6fa8759f4690b5..4d756ad373b995a2851a562168d05b7a1d0b27cb 100644 (file)
@@ -1017,6 +1017,9 @@ Not supported by all backends."
   :safe #'booleanp
   :version "31.1")
 
+(defvar vc-async-checkin-backends '(Git Hg)
+  "Backends which support `vc-async-checkin'.")
+
 \f
 ;; File property caching
 
@@ -1884,9 +1887,7 @@ Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'."
                      (vc-call-backend backend 'checkin
                                       files comment rev))
                    (mapc #'vc-delete-automatic-version-backups files)))
-       (if (and vc-async-checkin
-                ;; Backends which support `vc-async-checkin'.
-                (memq backend '(Git Hg)))
+       (if (and vc-async-checkin (memq backend vc-async-checkin-backends))
            ;; Rely on `vc-set-async-update' to update properties.
            (do-it)
          (message "Checking in %s..." (vc-delistify files))