From f3f87cab56d1bc1754d9e83a9dd53d0cb48c02b0 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Tue, 30 Nov 2021 21:05:42 +0100 Subject: [PATCH] Use VC-relative file names in ChangeLog entries * lisp/vc/diff-mode.el (diff-add-log-current-defuns): Check vc-root-dir to prepend the project path to the file being modified. See https://mail.gnu.org/archive/html/emacs-devel/2021-11/msg02195.html --- lisp/vc/diff-mode.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 057ffcd06e..40749754d8 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -2343,7 +2343,10 @@ diff-add-log-current-defuns ;; hunks (e.g., "diff --git ..." etc). (re-search-forward diff-hunk-header-re nil t) (setq hunk-end (save-excursion (diff-end-of-hunk))) - (pcase-let* ((filename (substring-no-properties (diff-find-file-name))) + (pcase-let* ((filename (substring-no-properties + (file-relative-name + (diff-find-file-name) + (vc-root-dir)))) (=lines 0) (+lines 0) (-lines 0) -- 2.34.0