From c206f68987cdb639b4311ce62e4b17c994aa6502 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sat, 27 Feb 2016 19:12:56 -0800 Subject: [PATCH] `vc-git-expanded-log-entry' strips constant leading whitespace from git logs lisp/vc/vc-git.el (vc-git-expanded-log-entry): When looking at expanded git logs with `vc-print-root-log' (C-x v L, then by default), emacs was stripping out all leading whitespace from git logs. I now strip exactly 2 leading spaces, which retains the indentation in the logs. (bug#18110) --- lisp/vc/vc-git.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 1c43e3e..8498cc8 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -970,7 +970,9 @@ vc-git-expanded-log-entry (goto-char (point-min)) (unless (eobp) ;; Indent the expanded log entry. - (indent-region (point-min) (point-max) 2) + (while (re-search-forward "^ " nil t) + (replace-match "") + (forward-line)) (buffer-string)))) (defun vc-git-region-history (file buffer lfrom lto) -- 2.1.4