Skip to content

Commit ddbb8cb

Browse files
author
vg
committed
Add git command message to diff view.
1 parent 5824a16 commit ddbb8cb

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

compact-blame.el

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
(defvar compact-blame-bg2 "#FFFFC0")
1515
(defvar compact-blame-light-coeff 650)
1616
(defvar compact-blame-name-limit 80)
17-
(defvar compact-blame-future-warning-branch nil)
17+
(defvar compact-blame-git-command '("git"))
1818

1919
;; End of config
2020
;; Using capitalized prefix for private functions/vars so they don't
@@ -400,9 +400,6 @@ to variables as a single unit"
400400
(lambda (&rest ignored)
401401
(setq buffer-read-only nil)
402402
(erase-buffer)
403-
;; TODO Why doesn't work without it?
404-
(insert " ")
405-
(setq buffer-read-only t)
406403
(diff-mode)
407404
;; In case the file has some non utf8 encoding:
408405
;; Tell git to encode commit message and then we decode it back
@@ -412,9 +409,11 @@ to variables as a single unit"
412409
'("diff" "-w" "--submodule=diff" "--no-color")
413410
(list "show"
414411
"--ignore-space-change" "--encoding" enc id
415-
"--no-color"))))
416-
(setq proc
417-
(apply 'start-process bn (current-buffer) "git" cmd)))
412+
"--no-color" "--submodule=diff"))))
413+
(setq cmd (append compact-blame-git-command cmd))
414+
(insert (format "--- Running %s...\n" cmd))
415+
(setq buffer-read-only t)
416+
(setq proc (apply 'start-process bn (current-buffer) cmd)))
418417
(set-process-coding-system proc cod-sys)
419418
(goto-char 1)
420419
(set-marker (process-mark proc) (point-max) (current-buffer))

0 commit comments

Comments
 (0)