diff options
| -rw-r--r-- | etc/NEWS | 4 | ||||
| -rw-r--r-- | lisp/vc/vc-git.el | 12 |
2 files changed, 14 insertions, 2 deletions
| @@ -880,6 +880,10 @@ If non-nil, only branches and remotes are considered when doing | |||
| 880 | completion over Git branch names. The default is nil, which causes | 880 | completion over Git branch names. The default is nil, which causes |
| 881 | tags to be considered as well. | 881 | tags to be considered as well. |
| 882 | 882 | ||
| 883 | --- | ||
| 884 | *** New user option 'vc-git-log-switches'. | ||
| 885 | String or list of strings specifying switches for Git log under VC. | ||
| 886 | |||
| 883 | ** Gnus | 887 | ** Gnus |
| 884 | 888 | ||
| 885 | +++ | 889 | +++ |
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index e37c09df7c2..bd29b88e87d 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -127,6 +127,13 @@ If nil, use the value of `vc-annotate-switches'. If t, use no switches." | |||
| 127 | (repeat :tag "Argument List" :value ("") string)) | 127 | (repeat :tag "Argument List" :value ("") string)) |
| 128 | :version "25.1") | 128 | :version "25.1") |
| 129 | 129 | ||
| 130 | (defcustom vc-git-log-switches t | ||
| 131 | "String or list of strings specifying switches for Git log under VC." | ||
| 132 | :type '(choice (const :tag "None" t) | ||
| 133 | (string :tag "Argument String") | ||
| 134 | (repeat :tag "Argument List" :value ("") string)) | ||
| 135 | :version "28.1") | ||
| 136 | |||
| 130 | (defcustom vc-git-resolve-conflicts t | 137 | (defcustom vc-git-resolve-conflicts t |
| 131 | "When non-nil, mark conflicted file as resolved upon saving. | 138 | "When non-nil, mark conflicted file as resolved upon saving. |
| 132 | That is performed after all conflict markers in it have been | 139 | That is performed after all conflict markers in it have been |
| @@ -1131,6 +1138,8 @@ This prompts for a branch to merge from." | |||
| 1131 | :type 'boolean | 1138 | :type 'boolean |
| 1132 | :version "26.1") | 1139 | :version "26.1") |
| 1133 | 1140 | ||
| 1141 | (autoload 'vc-switches "vc") | ||
| 1142 | |||
| 1134 | (defun vc-git-print-log (files buffer &optional shortlog start-revision limit) | 1143 | (defun vc-git-print-log (files buffer &optional shortlog start-revision limit) |
| 1135 | "Print commit log associated with FILES into specified BUFFER. | 1144 | "Print commit log associated with FILES into specified BUFFER. |
| 1136 | If SHORTLOG is non-nil, use a short format based on `vc-git-root-log-format'. | 1145 | 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." | |||
| 1164 | ,(format "--pretty=tformat:%s" | 1173 | ,(format "--pretty=tformat:%s" |
| 1165 | (car vc-git-root-log-format)) | 1174 | (car vc-git-root-log-format)) |
| 1166 | "--abbrev-commit")) | 1175 | "--abbrev-commit")) |
| 1176 | (vc-switches 'git 'log) | ||
| 1167 | (when (numberp limit) | 1177 | (when (numberp limit) |
| 1168 | (list "-n" (format "%s" limit))) | 1178 | (list "-n" (format "%s" limit))) |
| 1169 | (when start-revision | 1179 | (when start-revision |
| @@ -1385,8 +1395,6 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"." | |||
| 1385 | samp coding-system-for-read t))) | 1395 | samp coding-system-for-read t))) |
| 1386 | (setq coding-system-for-read 'undecided))) | 1396 | (setq coding-system-for-read 'undecided))) |
| 1387 | 1397 | ||
| 1388 | (autoload 'vc-switches "vc") | ||
| 1389 | |||
| 1390 | (defun vc-git-diff (files &optional rev1 rev2 buffer _async) | 1398 | (defun vc-git-diff (files &optional rev1 rev2 buffer _async) |
| 1391 | "Get a difference report using Git between two revisions of FILES." | 1399 | "Get a difference report using Git between two revisions of FILES." |
| 1392 | (let (process-file-side-effects | 1400 | (let (process-file-side-effects |