all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: jporterbugs@gmail.com, 67062@debbugs.gnu.org
Subject: bug#67062: 30.0.50; [PATCH] Abbreviate the revision in 'vc-annotate' (for Git)
Date: Sun, 12 Nov 2023 08:03:44 +0200	[thread overview]
Message-ID: <83sf5bv77j.fsf@gnu.org> (raw)
In-Reply-To: <2eb31324-ae24-db4b-4f62-a0140bfb9f81@gutov.dev> (message from Dmitry Gutov on Sun, 12 Nov 2023 00:00:13 +0200)

> Date: Sun, 12 Nov 2023 00:00:13 +0200
> Cc: 67062@debbugs.gnu.org
> From: Dmitry Gutov <dmitry@gutov.dev>
> 
> On 11/11/2023 09:41, Eli Zaretskii wrote:
> > If this is a Git-only issue, perhaps it would be better to have a
> > Git-only option, instead of defining a whole new VC method?
> 
> Our general approach is to prefer global options and dynamic dispatch on 
> backends, resorting to using per-backend options when it's much easier 
> to do.

Which I think is the case here.  What other VC backend has such long
revision strings?  I couldn't think of any.  And for Git, there could
be the choice of either shortening the SHA1 signature or using what
"git describe" returns.  Which is why I suggested an option specific
to vc-git.

> In this case it might actually be more difficult to go the second route 
> since the intention is to only use the short hash in this particular 
> place. vc-annotate is common code and it will need to indicate that 
> intention to the backend somehow.

I'm not sure I follow.  All we need is a new function to call instead
of vc-working-revision, that's all.  That new function will indicate
the intention to the backend.  Sounds easy enough.

IOW, if Git is a special case, there's IMO nothing wrong with having
code that is specific to Git.  Inventing a VC method that will do
nothing in every VCS but Git sounds un-economical and not very elegant
to me, FWIW.





  parent reply	other threads:[~2023-11-12  6:03 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-11  2:49 bug#67062: 30.0.50; [PATCH] Abbreviate the revision in 'vc-annotate' (for Git) Jim Porter
2023-11-11  7:41 ` Eli Zaretskii
2023-11-11 21:31   ` Jim Porter
2023-11-11 22:00   ` Dmitry Gutov
2023-11-12  0:31     ` Jim Porter
2023-11-12  6:03     ` Eli Zaretskii [this message]
2023-11-12 10:58       ` Dmitry Gutov
2023-11-12 11:15         ` Eli Zaretskii
2023-11-12 11:21           ` Dmitry Gutov
2023-11-12 18:48             ` Juri Linkov
2023-11-12 20:37               ` Dmitry Gutov
2023-11-12 22:13                 ` Jim Porter
2023-11-13  7:02                   ` Juri Linkov
2023-11-13 14:04                     ` Dmitry Gutov
2023-11-13 14:19                     ` Eli Zaretskii
2023-12-14 19:42                       ` Jim Porter
2023-12-14 19:51                         ` Eli Zaretskii
2023-12-14 20:34                           ` Jim Porter
2023-12-14 21:58                             ` Dmitry Gutov
2023-12-15  0:06                               ` Jim Porter
2023-12-15  0:15                                 ` Dmitry Gutov
2023-12-15  0:23                                 ` Jim Porter
2023-12-15  6:32                             ` Eli Zaretskii
2023-12-15  6:36                               ` Jim Porter
2023-12-15  8:50                                 ` Eli Zaretskii
2023-12-23 19:37                                   ` Jim Porter
2023-12-23 19:43                                     ` Dmitry Gutov
2023-12-23 19:49                                     ` Eli Zaretskii
2023-12-27 22:26                                       ` Jim Porter
2023-11-12 19:07       ` Jim Porter
2023-11-12 19:11         ` Eli Zaretskii
2023-11-12 19:33           ` Jim Porter
2023-11-12 20:35         ` Dmitry Gutov
2023-11-12 22:15           ` Jim Porter

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83sf5bv77j.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=67062@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    --cc=jporterbugs@gmail.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.