branch: elpa/magit
commit 601406ef14cea07dde9123619f857057cf5db814
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    Quote git invocations consistently in docstrings and comments
    
    Always use double-quotes, which was already the more common quoting
    style, but many instances instead still used elisp-symbol-quoting.
---
 lisp/magit-bisect.el          | 11 +++++------
 lisp/magit-branch.el          |  2 +-
 lisp/magit-diff.el            |  4 ++--
 lisp/magit-extras.el          | 10 +++++-----
 lisp/magit-git.el             | 43 +++++++++++++++++++++----------------------
 lisp/magit-log.el             |  2 +-
 lisp/magit-sparse-checkout.el |  4 ++--
 lisp/magit-status.el          |  2 +-
 lisp/magit-submodule.el       |  2 +-
 9 files changed, 39 insertions(+), 41 deletions(-)

diff --git a/lisp/magit-bisect.el b/lisp/magit-bisect.el
index 3a357c9155..4fb52b9458 100644
--- a/lisp/magit-bisect.el
+++ b/lisp/magit-bisect.el
@@ -190,16 +190,15 @@ to test.  This command lets Git choose a different one."
 (defun magit-bisect-run (cmdline &optional bad good args)
   "Bisect automatically by running commands after each step.
 
-Unlike `git bisect run' this can be used before bisecting has
-begun.  In that case it behaves like `git bisect start; git
-bisect run'."
+Unlike \"git bisect run\" this can be used before bisecting has begun.
+In that case it behaves like \"git bisect start; git bisect run\"."
   (interactive (let ((args (and (not (magit-bisect-in-progress-p))
                                 (magit-bisect-start-read-args))))
                  (cons (read-shell-command "Bisect shell command: ") args)))
   (when (and bad good)
     (magit-bisect-start--assert bad good args)
     ;; Avoid `magit-git-bisect' because it's asynchronous, but the
-    ;; next `git bisect run' call requires the bisect to be started.
+    ;; next "git bisect run" call requires the bisect to be started.
     (magit-with-toplevel
       (magit-process-git
        (list :file (expand-file-name "BISECT_CMD_OUTPUT" (magit-gitdir)))
@@ -244,13 +243,13 @@ bisect run'."
   (magit-file-lines (expand-file-name "BISECT_TERMS" (magit-gitdir))))
 
 (defun magit-insert-bisect-output ()
-  "While bisecting, insert section with output from `git bisect'."
+  "While bisecting, insert section with output from \"git bisect\"."
   (when (magit-bisect-in-progress-p)
     (let* ((lines
             (or (magit-file-lines
                  (expand-file-name "BISECT_CMD_OUTPUT" (magit-gitdir)))
                 (list "Bisecting: (no saved bisect output)"
-                      "It appears you have invoked `git bisect' from a shell."
+                      "It appears you have invoked \"git bisect\" from a 
shell."
                       "There is nothing wrong with that, we just cannot 
display"
                       "anything useful here.  Consult the shell output 
instead.")))
            (done-re "^\\([a-z0-9]\\{40,\\}\\) is the first bad commit$")
diff --git a/lisp/magit-branch.el b/lisp/magit-branch.el
index a97f0a3d5c..799bd5c882 100644
--- a/lisp/magit-branch.el
+++ b/lisp/magit-branch.el
@@ -85,7 +85,7 @@ them invalid as a branch name.  Recommended characters to use
 to trigger interpretation as a regexp are \"*\" and \"^\".  Some
 other characters which you might expect to be invalid, actually
 are not, e.g., \".+$\" are all perfectly valid.  More precisely,
-if `git check-ref-format --branch STRING' exits with a non-zero
+if \"git check-ref-format --branch STRING\" exits with a non-zero
 status, then treat STRING as a regexp.
 
 Assuming the chosen branch matches these conditions you would end
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index 4b922ff7e9..c62255d738 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -439,7 +439,7 @@ CommitDate: %cd
 
 All headers in revision buffers are inserted by the section
 inserter `magit-insert-revision-headers'.  Some of the headers
-are created by calling `git show --format=FORMAT' where FORMAT
+are created by calling \"git show --format=FORMAT\" where FORMAT
 is the format specified here.  Other headers are hard coded or
 subject to option `magit-revision-insert-related-refs'."
   :package-version '(magit . "2.3.0")
@@ -2757,7 +2757,7 @@ keymap is the parent of their keymaps."
          (setq orig (magit-decode-git-path orig)))
        (setq file (magit-decode-git-path file))
        (setq header (nreverse header))
-       ;; KLUDGE Before v2.54 `git-log' ignored `--no-prefix'
+       ;; KLUDGE Before v2.54, "git log" ignored `--no-prefix'
        ;; when `-L' is used.
        (when (and (magit-git-version< "2.54")
                   (derived-mode-p 'magit-log-mode)
diff --git a/lisp/magit-extras.el b/lisp/magit-extras.el
index 6fe333e995..4f1c9abf6d 100644
--- a/lisp/magit-extras.el
+++ b/lisp/magit-extras.el
@@ -125,7 +125,7 @@ alternative commands."
 
 ;;;###autoload
 (defun magit-run-git-gui-blame (commit filename &optional linenum)
-  "Run `git gui blame' on the given FILENAME and COMMIT.
+  "Run \"git gui blame\" on the given FILENAME and COMMIT.
 Interactively run it for the current file and the `HEAD', with a
 prefix or when the current file cannot be determined let the user
 choose.  When the current buffer is visiting FILENAME instruct
@@ -165,7 +165,7 @@ blame to center around the line point is on."
 
 ;;;###autoload
 (defun magit-run-git-gui ()
-  "Run `git gui' for the current git repository."
+  "Run \"git gui\" for the current git repository."
   (interactive)
   (magit-with-toplevel (magit-process-git 0 "gui")))
 
@@ -353,8 +353,8 @@ on a position in a file-visiting buffer."
   "Edit the commit that added the current line.
 
 With a prefix argument edit the commit that removes the line,
-if any.  The commit is determined using `git blame' and made
-editable using `git rebase --interactive' if it is reachable
+if any.  The commit is determined using \"git blame\" and made
+editable using \"git rebase --interactive\" if it is reachable
 from `HEAD', or by checking out the commit (or a branch that
 points at it) otherwise."
   (interactive (list (and current-prefix-arg 'removal)))
@@ -543,7 +543,7 @@ should contain \"%N\", which is replaced with the number 
that was
 determined in the previous step.
 
 Both formats, if non-nil and after removing %N, are then expanded
-using `git show --format=FORMAT ...' inside TOPLEVEL.
+using \"git show --format=FORMAT ...\" inside TOPLEVEL.
 
 The expansion of POINT-FORMAT is inserted at point, and the
 expansion of EOB-FORMAT is inserted at the end of the buffer (if
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index f0d9227920..e02f8f1918 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -209,17 +209,16 @@ on one another."
            (list "-c" "i18n.logOutputEncoding=UTF-8")))
   "Global Git arguments.
 
-The arguments set here are used every time the git executable is
-run as a subprocess.  They are placed right after the executable
-itself and before the git command - as in `git HERE... COMMAND
-REST'.  See the manpage `git(1)' for valid arguments.
-
-Be careful what you add here, especially if you are using Tramp
-to connect to servers with ancient Git versions.  Never remove
-anything that is part of the default value, unless you really
-know what you are doing.  And think very hard before adding
-something; it will be used every time Magit runs Git for any
-purpose."
+The arguments set here are used every time the git executable is run
+as a subprocess.  They are placed right after the executable itself
+and before the git command - as in \"git HERE... COMMAND REST\".
+See the manpage `git(1)' for valid arguments.
+
+Be careful what you add here, especially if you are using Tramp to
+connect to servers with ancient Git versions.  Never remove anything
+that is part of the default value, unless you really know what you
+are doing.  And think very hard before adding something; it will be
+used every time Magit runs Git for any purpose."
   :package-version '(magit . "4.3.2")
   :group 'magit-commands
   :group 'magit-process
@@ -683,7 +682,7 @@ executable."
                    (list (concat
                           (file-remote-p default-directory)
                           (or (magit-git-string "--exec-path")
-                              (error "`git --exec-path' failed"))))
+                              (error "\"git --exec-path\" failed"))))
                    exec-suffixes
                    #'file-executable-p)
       (executable-find command t)))
@@ -816,7 +815,7 @@ See info node `(magit)Debugging Tools' for more 
information."
 (defun magit-config-get-from-cached-list (key)
   (gethash
    (thread$ key
-     ;; `git config --list' downcases first and last components.
+     ;; "git config --list" downcases first and last components.
      (replace-regexp-in-string "\\`[^.]+" #'downcase $ t t)
      (replace-regexp-in-string "[^.]+\\'" #'downcase $ t t))
    (magit--with-refresh-cache (cons (magit-toplevel) 'config)
@@ -1451,30 +1450,30 @@ are considered."
 ;;; Revisions and References
 
 (defun magit-rev-parse (&rest args)
-  "Execute `git rev-parse ARGS', returning first line of output.
+  "Execute \"git rev-parse ARGS\", returning first line of output.
 If there is no output, return nil."
   (apply #'magit-git-string "rev-parse" args))
 
 (defun magit-rev-parse-safe (&rest args)
-  "Execute `git rev-parse ARGS', returning first line of output.
+  "Execute \"git rev-parse ARGS\", returning first line of output.
 If there is no output, return nil.  Like `magit-rev-parse' but
 ignore `magit-git-debug'."
   (apply #'magit-git-str "rev-parse" args))
 
 (defun magit-rev-parse-true (&rest args)
-  "Execute `git rev-parse ARGS', returning t if it prints \"true\".
+  "Execute \"git rev-parse ARGS\", returning t if it prints \"true\".
 If it prints \"false\", then return nil.  For any other output
 signal an error."
   (magit-git-true "rev-parse" args))
 
 (defun magit-rev-parse-false (&rest args)
-  "Execute `git rev-parse ARGS', returning t if it prints \"false\".
+  "Execute \"git rev-parse ARGS\", returning t if it prints \"false\".
 If it prints \"true\", then return nil.  For any other output
 signal an error."
   (magit-git-false "rev-parse" args))
 
 (defun magit-rev-parse-p (&rest args)
-  "Execute `git rev-parse ARGS', returning t if it prints \"true\".
+  "Execute \"git rev-parse ARGS\", returning t if it prints \"true\".
 Return t if the first (and usually only) output line is the
 string \"true\", otherwise return nil."
   (equal (magit-git-str "rev-parse" args) "true"))
@@ -2066,11 +2065,11 @@ where COMMITS is the number of commits in TAG but not 
in REV."
 When NAMESPACES is non-nil, list refs from these namespaces
 rather than those from `magit-list-refs-namespaces'.
 
-FORMAT is passed to the `--format' flag of `git for-each-ref'
+FORMAT is passed to the `--format' flag of \"git for-each-ref\"
 and defaults to \"%(refname)\".
 
 SORTBY is a key or list of keys to pass to the `--sort' flag
-of `git for-each-ref' to sort the refs within each namespace.
+of \"git for-each-ref\" to sort the refs within each namespace.
 When nil, use `magit-list-refs-sortby'.  If both are nil, use
 \"version:refname\", but only for \"refs/tags\"."
   (let ((format (concat "--format=%(symref)" (or format "%(refname)")))
@@ -2449,7 +2448,7 @@ If `first-parent' is set, traverse only first parents."
       (car (split-string (buffer-string))))))
 
 (defun magit-rev-format (format &optional rev args)
-  ;; Prefer `git log --no-walk' to `git show --no-patch' because it
+  ;; Prefer "git log --no-walk" to "git show --no-patch" because it
   ;; performs better in some scenarios.
   (let ((str (magit-git-string "log" "--no-walk"
                                (concat "--format=" format) args
@@ -2459,7 +2458,7 @@ If `first-parent' is set, traverse only first parents."
          str)))
 
 (defun magit-rev-insert-format (format &optional rev args)
-  ;; Prefer `git log --no-walk' to `git show --no-patch' because it
+  ;; Prefer "git log --no-walk" to "git show --no-patch" because it
   ;; performs better in some scenarios.
   (magit-git-insert "log" "--no-walk"
                     (concat "--format=" format) args
diff --git a/lisp/magit-log.el b/lisp/magit-log.el
index 9d1e2981c3..991e17930e 100644
--- a/lisp/magit-log.el
+++ b/lisp/magit-log.el
@@ -1556,7 +1556,7 @@ Do not add this to a hook variable."
               (forward-line)
               (magit-make-margin-overlay))
             ;; When `--format' is used and its value isn't one of the
-            ;; predefined formats, then `git-log' does not insert a
+            ;; predefined formats, then "git log" does not insert a
             ;; separator line.
             (save-excursion
               (forward-line -1)
diff --git a/lisp/magit-sparse-checkout.el b/lisp/magit-sparse-checkout.el
index 7835baa773..861478b034 100644
--- a/lisp/magit-sparse-checkout.el
+++ b/lisp/magit-sparse-checkout.el
@@ -22,7 +22,7 @@
 
 ;;; Commentary:
 
-;; This library provides an interface to the `git sparse-checkout'
+;; This library provides an interface to the "git sparse-checkout"
 ;; command (operating in cone mode).
 
 ;;; Code:
@@ -46,7 +46,7 @@
 
 (defun magit-sparse-checkout-directories ()
   "Return directories that are recursively included in the sparse checkout.
-See the `git sparse-checkout' manpage for details about
+See the \"git sparse-checkout\" manpage for details about
 \"recursive\" versus \"parent\" directories in cone mode."
   (and (magit-get-boolean "core.sparsecheckoutcone")
        (mapcar #'file-name-as-directory
diff --git a/lisp/magit-status.el b/lisp/magit-status.el
index ed038b5c4d..97bc935aba 100644
--- a/lisp/magit-status.el
+++ b/lisp/magit-status.el
@@ -271,7 +271,7 @@ Non-interactively DIRECTORY is (re-)initialized 
unconditionally."
                                     toplevel directory)))
           (user-error "Abort")))
       (list directory)))
-  ;; `git init' does not understand the meaning of "~"!
+  ;; "git init" does not understand the meaning of "~"!
   (magit-call-git "init" (magit-convert-filename-for-git
                           (expand-file-name directory)))
   (magit-status-setup-buffer directory))
diff --git a/lisp/magit-submodule.el b/lisp/magit-submodule.el
index fff4c32d02..042ae93b5d 100644
--- a/lisp/magit-submodule.el
+++ b/lisp/magit-submodule.el
@@ -463,7 +463,7 @@ whether they are wrapped in an additional section."
 ;;;###autoload
 (defun magit-insert-modules-overview ()
   "Insert sections for all modules.
-For each section insert the path and the output of `git describe --tags',
+For each section insert the path and the output of \"git describe --tags\",
 or, failing that, the abbreviated HEAD commit hash."
   (when-let ((modules (magit-list-module-paths)))
     (magit-insert-section (modules nil t)

Reply via email to