diff options
| author | Juri Linkov <juri@linkov.net> | 2019-11-28 00:14:46 +0200 |
|---|---|---|
| committer | Juri Linkov <juri@linkov.net> | 2019-11-28 00:14:46 +0200 |
| commit | f655967b83378b56390904a503ec0f1a19a1a7e9 (patch) | |
| tree | c8592e87f362c88dbef55da71021de22794f2fd7 /lisp/vc/vc-git.el | |
| parent | b31a966e88b1b4fbc8148fda47becd1d209a67fd (diff) | |
| download | emacs-f655967b83378b56390904a503ec0f1a19a1a7e9.tar.gz | |
'C-1 C-x v L' asks for revision and shows its log entry with diff (bug#38044)
* doc/emacs/maintaining.texi (VC Change Log): Explain the numeric prefix arg
of 'C-x v L' (vc-print-root-log).
* lisp/vc/vc-git.el (vc-git-print-log): Add command line option "-p"
when vc-log-view-type is 'with-diff'.
(vc-git-log-view-mode): Use long style when vc-log-view-type is 'with-diff'.
* lisp/vc/vc.el (vc-print-log-internal): Add optional arg 'type'.
(vc-log-internal-common): Use 'region-history-mode' when type is
'with-diff' and backend supports 'region-history-mode'.
(vc-print-root-log): Add optional arg 'revision'. In interactive spec
read a revision when current-prefix-arg is 1. Use current-prefix-arg
"as is" when it is a number. Show revision in long style with diff
when limit is 1 and revision is non-nil.
Diffstat (limited to 'lisp/vc/vc-git.el')
| -rw-r--r-- | lisp/vc/vc-git.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index ca4c66a06dc..71307cdffda 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -708,7 +708,7 @@ or an empty string if none." '(menu-item "Snapshot Stash" vc-git-stash-snapshot :help "Snapshot stash")) (define-key map [cr] - '(menu-item "Create Samed Stash" vc-git-stash + '(menu-item "Create Named Stash" vc-git-stash :help "Create named stash")) (define-key map [de] '(menu-item "Delete Stash" vc-git-stash-delete-at-point @@ -1134,8 +1134,7 @@ If LIMIT is a revision string, use it as an end-revision." ;; If the buffer exists from a previous invocation it might be ;; read-only. (let ((inhibit-read-only t)) - (with-current-buffer - buffer + (with-current-buffer buffer (apply 'vc-git-command buffer 'async files (append @@ -1161,6 +1160,8 @@ If LIMIT is a revision string, use it as an end-revision." "HEAD" limit))) (list start-revision))) + (when (eq vc-log-view-type 'with-diff) + (list "-p")) '("--"))))))) (defun vc-git-log-outgoing (buffer remote-location) @@ -1226,7 +1227,7 @@ log entries." (set (make-local-variable 'log-view-file-re) regexp-unmatchable) (set (make-local-variable 'log-view-per-file-logs) nil) (set (make-local-variable 'log-view-message-re) - (if (not (memq vc-log-view-type '(long log-search))) + (if (not (memq vc-log-view-type '(long log-search with-diff))) (cadr vc-git-root-log-format) "^commit *\\([0-9a-z]+\\)")) ;; Allow expanding short log entries. @@ -1235,7 +1236,7 @@ log entries." (set (make-local-variable 'log-view-expanded-log-entry-function) 'vc-git-expanded-log-entry)) (set (make-local-variable 'log-view-font-lock-keywords) - (if (not (memq vc-log-view-type '(long log-search))) + (if (not (memq vc-log-view-type '(long log-search with-diff))) (list (cons (nth 1 vc-git-root-log-format) (nth 2 vc-git-root-log-format))) (append |
