Subject: 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: Fri, 04 Apr 2025 14:02:50 +0300

> Date: Fri, 04 Apr 2025 12:09:47 +0800
> From:  jixiuf via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> How can I retrieve the current revision when I'm in a buffer opened by
> =vc-find-revision= ?
> 
> I'm attempting to write two commands: =vc-next-revision= and
> =vc-prev-revision=, similar to =magit-blob-next= and
> =magit-blob-previous=.

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?