]> git.eshelyaron.com Git - emacs.git/commitdiff
; * lisp/vc/vc.el (vc-clone): Fix wording of doc string.
authorEli Zaretskii <eliz@gnu.org>
Tue, 27 Feb 2024 13:11:58 +0000 (15:11 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 3 Mar 2024 17:04:20 +0000 (18:04 +0100)
(cherry picked from commit 647cecc853e53a3be0bb2cf5328cd19e677217c9)

lisp/vc/vc.el

index 3cd17276fa473feb33016f23d1d52aec1b47f4ed..7aadf8dd6ec00626ab63b7e5d427274818803775 100644 (file)
@@ -3801,12 +3801,18 @@ to provide the `find-revision' operation instead."
   (vc-call-backend (vc-backend buffer-file-name) 'check-headers))
 
 (defun vc-clone (remote &optional backend directory rev)
-  "Use BACKEND to clone REMOTE into DIRECTORY.
-If successful, returns the string with the directory of the
-checkout.  If BACKEND is nil, iterate through every known backend
-in `vc-handled-backends' until one succeeds.  If REV is non-nil,
-it indicates a specific revision to check out."
-  (setq directory (expand-file-name (or directory default-directory)))
+  "Clone repository REMOTE using version-control BACKEND, into DIRECTORY.
+If successful, return the string with the directory of the checkout;
+otherwise return nil.
+REMOTE should be a string, the URL of the remote repository or the name
+of a directory (if the repository is local).
+If DIRECTORY is nil or omitted, it defaults to `default-directory'.
+If BACKEND is nil or omitted, the function iterates through every known
+backend in `vc-handled-backends' until one succeeds to clone REMOTE.
+If REV is non-nil, it indicates a specific revision to check out after
+cloning; the syntax of REV depends on what BACKEND accepts."
+  (unless directory
+    (setq directory default-directory))
   (if backend
       (progn
         (unless (memq backend vc-handled-backends)