New user option for Git log switches
* lisp/vc/vc-git.el (vc-git-diff-switches): New defcustom. (vc-git-print-log): Use it. * etc/NEWS: Announce the new option. Copyright-paperwork-exempt: yes
This commit is contained in:
parent
90f54aad5e
commit
4a1e97bea9
2 changed files with 14 additions and 2 deletions
4
etc/NEWS
4
etc/NEWS
|
@ -880,6 +880,10 @@ If non-nil, only branches and remotes are considered when doing
|
|||
completion over Git branch names. The default is nil, which causes
|
||||
tags to be considered as well.
|
||||
|
||||
---
|
||||
*** New user option 'vc-git-log-switches'.
|
||||
String or list of strings specifying switches for Git log under VC.
|
||||
|
||||
** Gnus
|
||||
|
||||
+++
|
||||
|
|
|
@ -127,6 +127,13 @@ If nil, use the value of `vc-annotate-switches'. If t, use no switches."
|
|||
(repeat :tag "Argument List" :value ("") string))
|
||||
:version "25.1")
|
||||
|
||||
(defcustom vc-git-log-switches t
|
||||
"String or list of strings specifying switches for Git log under VC."
|
||||
:type '(choice (const :tag "None" t)
|
||||
(string :tag "Argument String")
|
||||
(repeat :tag "Argument List" :value ("") string))
|
||||
:version "28.1")
|
||||
|
||||
(defcustom vc-git-resolve-conflicts t
|
||||
"When non-nil, mark conflicted file as resolved upon saving.
|
||||
That is performed after all conflict markers in it have been
|
||||
|
@ -1131,6 +1138,8 @@ This prompts for a branch to merge from."
|
|||
:type 'boolean
|
||||
:version "26.1")
|
||||
|
||||
(autoload 'vc-switches "vc")
|
||||
|
||||
(defun vc-git-print-log (files buffer &optional shortlog start-revision limit)
|
||||
"Print commit log associated with FILES into specified BUFFER.
|
||||
If SHORTLOG is non-nil, use a short format based on `vc-git-root-log-format'.
|
||||
|
@ -1164,6 +1173,7 @@ If LIMIT is a revision string, use it as an end-revision."
|
|||
,(format "--pretty=tformat:%s"
|
||||
(car vc-git-root-log-format))
|
||||
"--abbrev-commit"))
|
||||
(vc-switches 'git 'log)
|
||||
(when (numberp limit)
|
||||
(list "-n" (format "%s" limit)))
|
||||
(when start-revision
|
||||
|
@ -1385,8 +1395,6 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"."
|
|||
samp coding-system-for-read t)))
|
||||
(setq coding-system-for-read 'undecided)))
|
||||
|
||||
(autoload 'vc-switches "vc")
|
||||
|
||||
(defun vc-git-diff (files &optional rev1 rev2 buffer _async)
|
||||
"Get a difference report using Git between two revisions of FILES."
|
||||
(let (process-file-side-effects
|
||||
|
|
Loading…
Add table
Reference in a new issue