emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/orgit 44a05c55d5 07/76: orgit-rev-store: Always use commit


From: ELPA Syncer
Subject: [nongnu] elpa/orgit 44a05c55d5 07/76: orgit-rev-store: Always use commit SHA-1 hash
Date: Thu, 13 Jan 2022 13:58:43 -0500 (EST)

branch: elpa/orgit
commit 44a05c55d5153fbcb7427160a505e476f7b3d65b
Author: Kyle Meyer <kyle@kyleam.com>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    orgit-rev-store: Always use commit SHA-1 hash
    
    Before, `org-rev-store' used whatever revision identifier was passed to
    `magit-show-commit', which could be relative to a branch name (e.g.,
    "master~2"). For the purpose of revision commit links, this is
    problematic because it may not refer to the same commit at a later time.
---
 orgit.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/orgit.el b/orgit.el
index 00c62fd27c..2a080b4305 100644
--- a/orgit.el
+++ b/orgit.el
@@ -190,7 +190,7 @@ If all of the above fails then `orgit-export' raises an 
error."
 (defun orgit-rev-store ()
   (when (memq major-mode '(magit-commit-mode magit-revision-mode))
     (let ((repo (abbreviate-file-name default-directory))
-          (rev  (car magit-refresh-args)))
+          (rev  (magit-rev-parse (car magit-refresh-args))))
       (org-store-link-props
        :type        "orgit-rev"
        :link        (format "orgit-rev:%s::%s" repo rev)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]