Commits

evhan committed aa5c472

avoid prematurely invalidating OIDs returned by reference-target

  • Participants
  • Parent commits dc344d9

Comments (0)

Files changed (1)

 (define (reference-target ref)
   ;; We have to dig out the intermediate reference in order to free it.
   (let* ((ref*   (git-reference-resolve (reference->pointer ref)))
-         (target (git-reference-target ref*)))
+         ; TODO Should use `oid-cpy` here.
+         (target (git-oid-fromstr (git-oid-fmt (git-reference-target ref*)))))
     (git-reference-free ref*)
     (pointer->oid target)))