Variable: package-review-diff-command

package-review-diff-command is a customizable variable defined in package.el.gz.

Value

("git" "diff" "--no-index" "--no-color" "--diff-filter=d" "--minimal"
 vc-git-diff-switches)

Documentation

Configuration of how package-review should generate a Diff.

The structure of the value must be (COMMAND . OPTIONS), where diff-command is rebound to be COMMAND and OPTIONS are command-line switches and arguments passed to diff-no-select as the SWITCHES argument if the user selects a diff-related option during review. SWITCHES may additionally also include a symbol, which is replaced by the symbol value.

This variable was added, or its default value changed, in Emacs 31.1.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/package.el.gz
(defcustom package-review-diff-command
  (if (executable-find "git")
      package--review-git-diff-command
    (list diff-command "-u" "-N"))
  "Configuration of how `package-review' should generate a Diff.
The structure of the value must be (COMMAND . OPTIONS), where
`diff-command' is rebound to be COMMAND and OPTIONS are command-line
switches and arguments passed to `diff-no-select' as the SWITCHES
argument if the user selects a diff-related option during review.
SWITCHES may additionally also include a symbol, which is replaced by
the symbol value."
  :type `(choice
          (const :tag "Use git diff, excluding deleted files"
                 ,package--review-git-diff-command)
          (const :tag "Use diff, without exclusion" ("diff" "-u" "-N"))
          (const :tag "Use diff, with exclusion of safe files"
                 ,(cons diff-command
                        (mapcar #'shell-quote-argument
                                '("-u"                  ;unified patch formatting
                                  "-N"                  ;treat absent files as empty
                                  "-x" "*.elc"          ;ignore byte compiled files
                                  "-x" "*-autoloads.el" ;ignore the autoloads file
                                  "-x" "*-pkg.el"       ;ignore the package description
                                  "-x" "*.info"         ;ignore compiled Info files
                                  ))))
          (cons :tag "Custom diff command"
                (string :tag "Diff command name")
                (repeat :tag "Diff command-line arguments"
                        (or symbol string))))
  :version "31.1")