branch: elpa/magit
commit 449d68e5db685ab95094df0db76b056e4d8a126f
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
Quote git arguments consistently in docstrings and comments
Always use double-quotes. Arguments to git are neither lisp
variables nor lisp functions.
---
lisp/magit-bisect.el | 2 +-
lisp/magit-commit.el | 4 ++--
lisp/magit-diff.el | 12 ++++++------
lisp/magit-git.el | 27 +++++++++++++--------------
lisp/magit-log.el | 12 ++++++------
lisp/magit-stash.el | 20 ++++++++++----------
lisp/magit.el | 2 +-
7 files changed, 39 insertions(+), 40 deletions(-)
diff --git a/lisp/magit-bisect.el b/lisp/magit-bisect.el
index 4fb52b9458..8b11cf335a 100644
--- a/lisp/magit-bisect.el
+++ b/lisp/magit-bisect.el
@@ -31,7 +31,7 @@
;;; Options
(defcustom magit-bisect-show-graph t
- "Whether to use `--graph' in the log showing commits yet to be bisected."
+ "Whether to use \"--graph\" in the log showing commits yet to be bisected."
:package-version '(magit . "2.8.0")
:group 'magit-status
:type 'boolean)
diff --git a/lisp/magit-commit.el b/lisp/magit-commit.el
index 1be0e4ba18..c79a90a117 100644
--- a/lisp/magit-commit.el
+++ b/lisp/magit-commit.el
@@ -376,7 +376,7 @@ the user explicitly select a commit, in a buffer dedicated
to that task.
Leave the original commit message of the targeted commit untouched.
-Like `magit-commit-fixup' but also run a `--autofixup' rebase."
+Like `magit-commit-fixup' but also run a \"--autofixup\" rebase."
(interactive (list (magit-commit-at-point)
(magit-commit-arguments)))
(magit-commit-squash-internal "--fixup=" commit args nil nil 'rebase))
@@ -393,7 +393,7 @@ Turing the rebase phase, when the two commits are being
squashed, ask
the user to author the final commit message, based on the original
message of the targeted commit.
-Like `magit-commit-squash' but also run a `--autofixup' rebase."
+Like `magit-commit-squash' but also run a \"--autofixup\" rebase."
(interactive (list (magit-commit-at-point)
(magit-commit-arguments)))
(magit-commit-squash-internal "--squash=" commit args nil nil 'rebase))
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index c62255d738..ecc4671068 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -346,12 +346,12 @@ that many spaces. Otherwise, highlight neither."
:type 'boolean)
(defcustom magit-diff-extra-stat-arguments nil
- "Additional arguments to be used alongside `--stat'.
+ "Additional arguments to be used alongside \"--stat\".
A list of zero or more arguments or a function that takes no
argument and returns such a list. These arguments are allowed
-here: `--stat-width', `--stat-name-width', `--stat-graph-width'
-and `--compact-summary'. See the git-diff(1) manpage."
+here: \"--stat-width\", \"--stat-name-width\", \"--stat-graph-width\"
+and \"--compact-summary\". See the git-diff(1) manpage."
:package-version '(magit . "3.0.0")
:group 'magit-diff
:type `(radio (function-item ,#'magit-diff-use-window-width-as-stat-width)
@@ -2554,7 +2554,7 @@ keymap is the parent of their keymaps."
"\\(-*\\)$")) ; del
(defun magit-diff-use-window-width-as-stat-width ()
- "Use the `window-width' as the value of `--stat-width'."
+ "Use the `window-width' as the value of \"--stat-width\"."
(and$ (get-buffer-window (current-buffer) 'visible)
(list (format "--stat-width=%d" (window-width $)))))
@@ -2757,8 +2757,8 @@ 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'
- ;; when `-L' is used.
+ ;; 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)
(seq-some (##string-prefix-p "-L" %)
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index e02f8f1918..adf17ad0a3 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -261,7 +261,7 @@ is called by functions like `magit-list-branch-names' to
generate
the collection of refs. By default, refs are sorted according to
their full refname (i.e., \"refs/...\").
-Any value accepted by the `--sort' flag of \"git for-each-ref\" can
+Any value accepted by the \"--sort\" flag of \"git for-each-ref\" can
be used. For example, \"-creatordate\" places refs with more
recent committer or tagger dates earlier in the list. A list of
strings can also be given in order to pass multiple sort keys to
@@ -930,9 +930,9 @@ not located inside a Git repository, then return nil."
;; Kludge: git-annex converts submodule gitdirs to symlinks. See #3599.
(when (file-symlink-p (directory-file-name gitdir))
(setq gitdir (file-truename gitdir)))
- ;; We want to delete the entry for `topdir' here, rather than within
- ;; (unless ...), in case a `--separate-git-dir' repository was switched to
- ;; the standard structure (i.e., "topdir/.git/").
+ ;; We want to delete the entry for `topdir' here, rather than
+ ;; within (unless ...), in case a "--separate-git-dir" repository
+ ;; was switched to the standard structure (i.e., "topdir/.git/").
(setq magit--separated-gitdirs (cl-delete topdir
magit--separated-gitdirs
:key #'car :test #'equal))
@@ -968,14 +968,13 @@ tree, then it is not possible to avoid returning the
truename."
(;; Always honor these settings.
[_(not find-file-visit-truename)]
[_(not (getenv "GIT_WORK_TREE"))]
- ;; `--show-cdup' is the relative path to the toplevel
- ;; from `(file-truename default-directory)'. Here we
- ;; pretend it is relative to `default-directory', and
- ;; go to that directory. Then we check whether
- ;; `--show-toplevel' still returns the same value and
- ;; whether `--show-cdup' now is the empty string. If
- ;; both is the case, then we are at the toplevel of
- ;; the same working tree, but also avoided needlessly
+ ;; "--show-cdup" is the relative path to the toplevel from
+ ;; (file-truename default-directory). Here we pretend it is
+ ;; relative to `default-directory', and go to that directory.
+ ;; Then we check whether "--show-toplevel" still returns the
+ ;; same value and whether "--show-cdup" now is the empty
+ ;; string. If both is the case, then we are at the toplevel
+ ;; of the same working tree, but also avoided needlessly
;; following any symlinks.
[updir (file-name-as-directory
(magit-rev-parse-safe "--show-cdup"))]
@@ -2065,10 +2064,10 @@ 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
+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.
When nil, use `magit-list-refs-sortby'. If both are nil, use
\"version:refname\", but only for \"refs/tags\"."
diff --git a/lisp/magit-log.el b/lisp/magit-log.el
index 991e17930e..212b9172b2 100644
--- a/lisp/magit-log.el
+++ b/lisp/magit-log.el
@@ -79,10 +79,10 @@
:type 'hook)
(defcustom magit-log-remove-graph-args '("--follow" "-G" "-S" "-L")
- "The log arguments that cause the `--graph' argument to be dropped.
+ "The log arguments that cause the \"--graph\" argument to be dropped.
The default value lists the arguments that are incompatible with
-`--graph' and therefore must be dropped when that is used. You
+\"--graph\" and therefore must be dropped when that is used. You
can add additional arguments that are available in `magit-log',
but I recommend that you don't do that. Nowadays I would define
this as a constant, but I am preserving it as an option, in case
@@ -209,7 +209,7 @@ because the latter may make use of Imenu's outdated cache."
(defcustom magit-log-color-graph-limit 256
"Number of commits over which log graphs are not colored.
-When showing more commits than specified, then the `--color'
+When showing more commits than specified, then the \"--color\"
argument is silently dropped. This is necessary because the
`ansi-color' library, which is used to turn control sequences
into faces, is just too slow."
@@ -220,7 +220,7 @@ into faces, is just too slow."
(defcustom magit-log-show-signatures-limit 256
"Number of commits over which signatures are not verified.
When showing more commits than specified by this option, then the
-`--show-signature' argument, if specified, is silently dropped.
+\"--show-signature\" argument, if specified, is silently dropped.
This is necessary because checking the signature of a large
number of commits is just too slow."
:package-version '(magit . "4.0.0")
@@ -778,7 +778,7 @@ completion candidates."
;;;###autoload
(defun magit-log-buffer-file (&optional follow beg end)
"Show log for the blob or file visited in the current buffer.
-With a prefix argument or when `--follow' is an active log
+With a prefix argument or when \"--follow\" is an active log
argument, then follow renames. When the region is active,
restrict the log to the lines that the region touches."
(interactive (cons current-prefix-arg (magit-file-region-line-numbers)))
@@ -1555,7 +1555,7 @@ Do not add this to a hook variable."
(save-excursion (insert align)))
(forward-line)
(magit-make-margin-overlay))
- ;; When `--format' is used and its value isn't one of the
+ ;; When "--format" is used and its value isn't one of the
;; predefined formats, then "git log" does not insert a
;; separator line.
(save-excursion
diff --git a/lisp/magit-stash.el b/lisp/magit-stash.el
index 96346e8363..3d79e94954 100644
--- a/lisp/magit-stash.el
+++ b/lisp/magit-stash.el
@@ -124,8 +124,8 @@ AUTHOR-WIDTH has to be an integer. When the name of the
author
(defun magit-stash-both (message &optional include-untracked)
"Create a stash of the index and working tree.
Untracked files are included according to infix arguments.
-One prefix argument is equivalent to `--include-untracked'
-while two prefix arguments are equivalent to `--all'."
+One prefix argument is equivalent to \"--include-untracked\"
+while two prefix arguments are equivalent to \"--all\"."
(interactive
(progn (when (and (magit-merge-in-progress-p)
(not (magit-y-or-n-p "\
@@ -150,8 +150,8 @@ Applying the resulting stash has the inverse effect."
(defun magit-stash-worktree (message &optional include-untracked)
"Create a stash of unstaged changes in the working tree.
Untracked files are included according to infix arguments.
-One prefix argument is equivalent to `--include-untracked'
-while two prefix arguments are equivalent to `--all'."
+One prefix argument is equivalent to \"--include-untracked\"
+while two prefix arguments are equivalent to \"--all\"."
(interactive (magit-stash-read-args))
(magit-stash-save message nil t include-untracked t 'index))
@@ -159,8 +159,8 @@ while two prefix arguments are equivalent to `--all'."
(defun magit-stash-keep-index (message &optional include-untracked)
"Create a stash of the index and working tree, keeping index intact.
Untracked files are included according to infix arguments.
-One prefix argument is equivalent to `--include-untracked'
-while two prefix arguments are equivalent to `--all'."
+One prefix argument is equivalent to \"--include-untracked\"
+while two prefix arguments are equivalent to \"--all\"."
(interactive (magit-stash-read-args))
(magit-stash-save message t t include-untracked t 'index))
@@ -206,8 +206,8 @@ The resulting message is what Git would have used."
(defun magit-snapshot-both (&optional include-untracked)
"Create a snapshot of the index and working tree.
Untracked files are included according to infix arguments.
-One prefix argument is equivalent to `--include-untracked'
-while two prefix arguments are equivalent to `--all'."
+One prefix argument is equivalent to \"--include-untracked\"
+while two prefix arguments are equivalent to \"--all\"."
(interactive (magit-snapshot-read-args))
(magit-snapshot-save t t include-untracked t))
@@ -222,8 +222,8 @@ Unstaged and untracked changes are not stashed."
(defun magit-snapshot-worktree (&optional include-untracked)
"Create a snapshot of unstaged changes in the working tree.
Untracked files are included according to infix arguments.
-One prefix argument is equivalent to `--include-untracked'
-while two prefix arguments are equivalent to `--all'."
+One prefix argument is equivalent to \"--include-untracked\"
+while two prefix arguments are equivalent to \"--all\"."
(interactive (magit-snapshot-read-args))
(magit-snapshot-save nil t include-untracked t))
diff --git a/lisp/magit.el b/lisp/magit.el
index 311b42b91d..86513f7240 100644
--- a/lisp/magit.el
+++ b/lisp/magit.el
@@ -78,7 +78,7 @@
(defcustom magit-openpgp-default-signing-key nil
"Fingerprint of your default Openpgp key used for signing.
If the specified primary key has signing capacity then it is used
-as the value of the `--gpg-sign' argument without prompting, even
+as the value of the \"--gpg-sign\" argument without prompting, even
when other such keys exist. To be able to select another key you
must then use a prefix argument."
:package-version '(magit . "4.0.0")