From 3198d7772cebdecf456c956ab35d62059a0407a1 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 29 May 2025 12:41:36 +0100 Subject: [PATCH] Factor out vc-async-checkin-backends 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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 6292d76add7..4d756ad373b 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -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'.") + ;; 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)) -- 2.39.5