bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38044: 27.0.50; There should be an easier way to look at a specific


From: Eli Zaretskii
Subject: bug#38044: 27.0.50; There should be an easier way to look at a specific vc commit
Date: Thu, 21 Nov 2019 16:59:02 +0200

> From: Juri Linkov <juri@linkov.net>
> Cc: dgutov@yandex.ru,  larsi@gnus.org,  stephen.berman@gmx.net,
>   38044@debbugs.gnu.org
> Date: Wed, 20 Nov 2019 23:50:00 +0200
> 
> >> Then we could use something like the existing backend 'region-history'
> >> that for vc-git uses 'git log', but displays both the log and diff
> >> in one output buffer.
> >
> > region-history is slow, so I'm not sure it is a good starting point
> > for this feature.  A diff command is usually very fats with every VCS.
> 
> It doesn't use 'region-history'.  I meant using 'region-history-mode'
> on the output buffer.

Ah, okay.  Btw, region-history-mode is a Git-only feature, so I don't
think I understand why it is in vc.el and not in vc-git.el.

> Everything works perfectly with this patch that also implements
> defaulting to the revision under point and prompting for the
> directory like Lars asked to do:

Thanks.  A few comments:

> +;; - print-revision (revision)
> +;;
> +;;   Show details of REVISION.
> +;;

I'd prefer this to be a variant of vc-diff, and bound to "C-x v =".
The "C-u C-x v =" form is already taken, and tweaking it to accept a
single revision would not be easy.  So how about "C-u C-u C-x v ="?

The reason I think this should be a vc-diff subcommand is that most
kinds of VCS describe a revision as diffs.  Where a revision's
description is expected to include meta-data, i.e. the VCS backend
provides a command to show a revision in that format, we should use
that backend command, of course.  But conceptually we just show diffs,
so inventing a whole new class of VC commands for a minor variant of
diffs display sounds sub-optimal to me.

Also, why only implement this for a single backend?  The corresponding
diff commands exist in every VCS we support, so let's implement this
for all of them, okay?  Let us know if you need help with other VCSes.

Finally, this needs documentation in NEWS and in the user manual.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]