[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/agitate db3db42d1b: Add agitate-vc-git-find-revision co
From: |
ELPA Syncer |
Subject: |
[elpa] externals/agitate db3db42d1b: Add agitate-vc-git-find-revision command |
Date: |
Tue, 18 Oct 2022 19:57:15 -0400 (EDT) |
branch: externals/agitate
commit db3db42d1bb30a80b4927448884741a7a42f9e2d
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Add agitate-vc-git-find-revision command
---
README.org | 4 ++++
agitate.el | 13 +++++++++++++
2 files changed, 17 insertions(+)
diff --git a/README.org b/README.org
index 011975649c..deb49eb8b7 100644
--- a/README.org
+++ b/README.org
@@ -177,6 +177,10 @@ displays the log-edit buffer.
:CUSTOM_ID: h:f1a1f462-b6db-415a-b8e6-ba23788cb6e3
:END:
+#+findex: agitate-vc-git-find-revision
++ Function ~agitate-vc-git-find-revision~ :: Find revision of current
+ file, visiting it in a buffer. Prompt with completion for the revision.
+
#+findex: agitate-vc-git-show
#+vindex: agitate-log-limit
+ Function ~agitate-vc-git-show~ :: Prompt for commit and run
diff --git a/agitate.el b/agitate.el
index 3da002998d..c5fea87362 100644
--- a/agitate.el
+++ b/agitate.el
@@ -396,6 +396,19 @@ option `agitate-log-limit'."
"--"))
nil t)))
+;;;###autoload
+(defun agitate-vc-git-find-revision ()
+ "Find revision of current file, visiting it in a buffer.
+Prompt with completion for the revision."
+ (declare (interactive-only t))
+ (interactive)
+ (when-let* ((fileset (vc-deduce-fileset))
+ (file (caadr fileset))
+ (revision (agitate--vc-git-get-hash-from-string
+ (agitate--vc-git-commit-prompt
+ file))))
+ (pop-to-buffer (vc-find-revision file revision (car fileset)))))
+
;;;###autoload
(defun agitate-vc-git-show (&optional current-file)
"Prompt for commit and run `git-show(1)' on it.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/agitate db3db42d1b: Add agitate-vc-git-find-revision command,
ELPA Syncer <=