[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#62940: 29.0.60; vc: no easy way to get diff of all outgoing changes
From: |
Juri Linkov |
Subject: |
bug#62940: 29.0.60; vc: no easy way to get diff of all outgoing changes |
Date: |
Wed, 16 Aug 2023 10:48:18 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
>>> C-x v O C-x h =
>>>
>>> Which would be D. in the original message. It doesn't support uncommitted
>>> changes, but I would be surprised if it did.
>>
>> It's supported only for vc that inserts a text header in logs like RCS.
>> I proposed to insert extra line that represents uncommitted git changes,
>> and I'm using this feature all the time.
>
> Is your patch for this available somewhere? I find myself wanting the
> same thing for hg.
Searching the right version in the archives would take much time,
so it's easier just to send the version that I use every day.
Here it is, just 3 new lines:
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index a7763360795..37dc619da5e 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1419,6 +1419,9 @@ vc-git-print-log
;; read-only.
(let ((inhibit-read-only t))
(with-current-buffer buffer
+ (when (memq vc-log-view-type '(long short))
+ (insert (propertize "(Type 'd' here to show diffs with working
version)\n"
+ 'font-lock-face 'shadow)))
(apply #'vc-git-command buffer
'async files
(append
>> But the problem is that it's inserted even when 'C-x v b l' lists
>> another branch where such line makes no sense.
>
> Maybe we could only insert this line if there are actually uncommitted
> changes?
Good idea. Also this line should not be shown in the output of
'vc-print-branch-log'.
PS: Sorry that answering your other requests about the project features
will take a little more time.