tracking repository reference in commit object
Dear,
The lifetime of objects should be synchronized to prevent them from being GC'd; as is done with %submodule-owners
in (git submodule)
. For an example, see Guix 41425#10.
(use-modules (guix git) (guix channels) (guix tests git) (git))
(define dir (url-cache-directory (channel-url (car %default-channels))))
(define repo (repository-open dir))
(define merge (find-commit repo "Merge"))
(define left (car (commit-parents merge)))
merge
;; $1 = #<git-commit b4440de133401abc6ce8be6c1c2e720efd9b2ba3>
left
;; $2 = #<git-commit 141262f266ab702c856f634889d4130ae661e79f>
(commit-relation left merge)
;; $3 = ancestor
(define repo 42)
(commit-relation left merge)
;; $4 = ancestor
(gc)
(commit-relation left merge)
Segmentation fault