[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/agitate a9a8339126 46/67: Add PROOF OF CONCEPT vc-git-f
From: |
ELPA Syncer |
Subject: |
[elpa] externals/agitate a9a8339126 46/67: Add PROOF OF CONCEPT vc-git-find-revision |
Date: |
Wed, 28 Sep 2022 16:57:29 -0400 (EDT) |
branch: externals/agitate
commit a9a833912613ff69c3440bf8569b36ee754eda13
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Add PROOF OF CONCEPT vc-git-find-revision
---
agitate.el | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/agitate.el b/agitate.el
index f4bdd0f4db..249efae604 100644
--- a/agitate.el
+++ b/agitate.el
@@ -279,6 +279,23 @@ With optional FILE, limit the commits to those pertinent
to it."
(process-lines vc-git-program "log" "--oneline" "--")
nil t))))
+(defvar agitate-vc-git-show-buffer "*agitate-vc-git-show*"
+ "Buffer for showing a git commit.")
+
+;;;###autoload
+(defun vc-git-find-revision ()
+ "PROOF OF CONCEPT.
+
+Prompt for commit and visit it as a file."
+ (interactive)
+ (when-let* ((file (caadr (vc-deduce-fileset))) ; FIXME 2022-09-27: Better
way to get current file?
+ (revision (agitate--vc-git-get-hash-from-string
+ (agitate--vc-git-commit-prompt file)))
+ (buf "*agitate-vc-git-show*"))
+ (apply 'vc-git-command (get-buffer-create buf) nil file (list "show"
revision))
+ (with-current-buffer (pop-to-buffer buf)
+ (diff-mode))))
+
;;;###autoload
(defun agitate-vc-git-grep (regexp)
"Run `git-grep(1)' for REGEXP in `vc-root-dir'.
- [elpa] externals/agitate 2250f3d039 33/67: Expand the README.org, (continued)
- [elpa] externals/agitate 2250f3d039 33/67: Expand the README.org, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 2c9f6bb3be 20/67: Rename to agitate-vc-git-push-prompt-for-remote, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 418d24bd13 60/67: Tweak comments about gitmoji, conventional commits, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate d808406253 48/67: Edit vc-git-show (PROOF OF CONCEPT), ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 4192d8d892 51/67: Clarify doc of helper function, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 9146d7cd54 31/67: Rename to agitate-diff-enable-outline-minor-mode, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 27cdb6fd95 57/67: Improve agitate-vc-git-prompt-format-patch-single, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 1df9714eb6 49/67: Accept optional long agitate--vc-git-commit-prompt, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate ed6c5cfb71 32/67: Capitalise Unicode in doc string, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate aa04a25eb1 58/67: Rename to agitate-vc-git-format-patch-single, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate a9a8339126 46/67: Add PROOF OF CONCEPT vc-git-find-revision,
ELPA Syncer <=
- [elpa] externals/agitate 412834ce07 66/67: Fix file no dir in agitate--log-edit-extract-file, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate a32ed823b6 24/67: Add TODO about conventional commits, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate fa0a9e5260 42/67: Add echo to agitate-vc-git-kill-commit-message, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 063d94c983 35/67: Add generic README in markdown, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate f9dd3b3f91 41/67: Add agitate-vc-git-kill-commit-message command, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate ca4b65bf85 36/67: Add gitignore, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 0b80819820 62/67: Refine regexp for git hash extraction, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 45eb3b6c5d 54/67: Declare agitate-vc-git-show as interactive-only, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 912161bfc1 27/67: Add doclicense.texi which is used in the manual, ELPA Syncer, 2022/09/28
- [elpa] externals/agitate 6eb66ed1cc 44/67: Add helper to extract commit hash, ELPA Syncer, 2022/09/28