update packages
This commit is contained in:
@@ -94,12 +94,17 @@ The following %-specs can be used in `heading-format' and
|
||||
`margin-format':
|
||||
|
||||
%H hash using face `magit-blame-hash'
|
||||
%h truncated hash using face `magit-blame-hash'
|
||||
%s summary using face `magit-blame-summary'
|
||||
%a author using face `magit-blame-name'
|
||||
%A author time using face `magit-blame-date'
|
||||
%c committer using face `magit-blame-name'
|
||||
%C committer time using face `magit-blame-date'
|
||||
|
||||
Note that for performance reasons %h results in truncated
|
||||
hashes, as opposed to properly abbreviated hashes that are
|
||||
guaranteed to uniquely identify a commit.
|
||||
|
||||
Additionally if `margin-format' ends with %f, then the string
|
||||
that is displayed in the margin is made at least `margin-width'
|
||||
characters wide, which may be desirable if the used face sets
|
||||
@@ -343,8 +348,7 @@ in `magit-blame-read-only-mode-map' instead."
|
||||
(unless magit-blame--style
|
||||
(setq magit-blame--style (car magit-blame-styles)))
|
||||
(setq magit-blame--make-margin-overlays
|
||||
(and (cl-find-if (lambda (style)
|
||||
(assq 'margin-format (cdr style)))
|
||||
(and (cl-find-if (##assq 'margin-format (cdr %))
|
||||
magit-blame-styles)))
|
||||
(magit-blame--update-margin 'enable))
|
||||
(t
|
||||
@@ -702,6 +706,7 @@ modes is toggled, then this mode also gets toggled automatically.
|
||||
(cdr (assoc k2 revinfo)))
|
||||
f)))
|
||||
`((?H . ,(p0 rev 'magit-blame-hash))
|
||||
(?h . ,(p0 (magit-blame--abbrev-hash rev) 'magit-blame-hash))
|
||||
(?s . ,(p1 "summary" 'magit-blame-summary))
|
||||
(?a . ,(p1 "author" 'magit-blame-name))
|
||||
(?c . ,(p1 "committer" 'magit-blame-name))
|
||||
@@ -732,6 +737,13 @@ modes is toggled, then this mode also gets toggled automatically.
|
||||
(seconds-to-time (string-to-number time))
|
||||
tz-in-second)))
|
||||
|
||||
(defvar-local magit-blame--abbrev-length nil)
|
||||
|
||||
(defun magit-blame--abbrev-hash (rev)
|
||||
(substring rev 0 (or magit-blame--abbrev-length
|
||||
(setq magit-blame--abbrev-length
|
||||
(magit-abbrev-length)))))
|
||||
|
||||
(defun magit-blame--remove-overlays (&optional beg end)
|
||||
(save-restriction
|
||||
(widen)
|
||||
@@ -758,10 +770,9 @@ modes is toggled, then this mode also gets toggled automatically.
|
||||
Show the information about the chunk at point in the echo area
|
||||
when moving between chunks. Unlike other blaming commands, do
|
||||
not turn on `read-only-mode'."
|
||||
:if (lambda ()
|
||||
(and buffer-file-name
|
||||
:if (##and buffer-file-name
|
||||
(or (not magit-blame-mode)
|
||||
buffer-read-only)))
|
||||
buffer-read-only))
|
||||
(interactive (list (magit-blame-arguments)))
|
||||
(when magit-buffer-file-name
|
||||
(user-error "Blob buffers aren't supported"))
|
||||
|
||||
Reference in New Issue
Block a user