From: Juri Linkov <juri@linkov.net>
To: Spencer Baugh <sbaugh@janestreet.com>
Cc: Dmitry Gutov <dmitry@gutov.dev>,
62940@debbugs.gnu.org, Filipp Gunbin <fgunbin@fastmail.fm>
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 [thread overview]
Message-ID: <86il9fbf7h.fsf@mail.linkov.net> (raw)
In-Reply-To: <ier5y5hqul4.fsf@janestreet.com> (Spencer Baugh's message of "Mon, 14 Aug 2023 15:42:31 -0400")
>>> 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.
next prev parent reply other threads:[~2023-08-16 7:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-18 19:12 bug#62940: 29.0.60; vc: no easy way to get diff of all outgoing changes Spencer Baugh
2023-04-18 20:36 ` Filipp Gunbin
2023-04-18 20:43 ` Dmitry Gutov
2023-04-19 6:49 ` Juri Linkov
2023-08-14 19:42 ` Spencer Baugh
2023-08-16 7:48 ` Juri Linkov [this message]
2023-04-18 21:59 ` Spencer Baugh
2023-04-21 18:36 ` sbaugh
2023-04-22 6:57 ` Eli Zaretskii
2023-04-22 13:00 ` sbaugh
2023-04-22 13:17 ` Eli Zaretskii
2023-04-22 18:33 ` Dmitry Gutov
2023-04-22 19:27 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86il9fbf7h.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=62940@debbugs.gnu.org \
--cc=dmitry@gutov.dev \
--cc=fgunbin@fastmail.fm \
--cc=sbaugh@janestreet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).