Commit 55cf6fdf authored by Jonas Bernoulli's avatar Jonas Bernoulli

magit-revision-refresh-buffer: mention file filter in header line

parent 230ab992
......@@ -42,6 +42,9 @@ Fixes since v2.5.0
`magit-pre-call-git-hook' and logging its git command to the
magit-process buffer.
* When a revision buffer was limited to a set of files, its header
line did not say so.
* On `windows-nt' systems, having `mount' in `exec-path' caused Magit
to assume that git is from Cygwin.
......
......@@ -1508,9 +1508,15 @@ Staging and applying changes is documented in info node
:group 'magit-revision
(hack-dir-local-variables-non-file-buffer))
(defun magit-revision-refresh-buffer (rev __const _args _files)
(defun magit-revision-refresh-buffer (rev __const _args files)
(setq header-line-format
(propertize (format " %s %s" (capitalize (magit-object-type rev)) rev)
(propertize (concat " " (capitalize (magit-object-type rev))
" " rev
(pcase (length files)
(0)
(1 (concat " in file " (car files)))
(_ (concat " in files "
(mapconcat #'identity files ", ")))))
'face 'magit-header-line))
(magit-insert-section (commitbuf)
(run-hook-with-args 'magit-revision-sections-hook rev)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment