Subject: Re: bug#77529: 31.0.50; [Feature Request][VC] How can I get the current revision of the buffer opened by =vc-find-revision=?

From: Eli Zaretskii <[email-masked]>
Date: Sat, 05 Apr 2025 10:55:44 +0300

> From: jixiuf <[email-masked]>
> Cc: [email-masked]
> Date: Sat, 05 Apr 2025 15:41:28 +0800
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >
> > Emacs already has vc-git-next-revision, so if you need this only
> > for Git, the function is already there, you just need to wrap it with
> > a command.
> >
> > As for vc-prev-revision, isn't that just SHA^, where SHA is the hash
> > of the revision used to call vc-prev-revision?
> 
> But how can I get the SHA of the current revision when I am in a buffer
> opened by =vc-find-revision=?

That's the argument with which vc-find-revision was called, right?  So
the only change we might need is to record the revision in some
buffer-local variable, if we don't already do that (don't we show the
revision of the mode line?).