summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tissue/git.scm12
1 files changed, 10 insertions, 2 deletions
diff --git a/tissue/git.scm b/tissue/git.scm
index 9a95352..79d6f0b 100644
--- a/tissue/git.scm
+++ b/tissue/git.scm
@@ -27,10 +27,12 @@
#:use-module (ice-9 match)
#:use-module (git)
#:use-module (git types)
- #:use-module ((system foreign) #:select (%null-pointer))
+ #:use-module ((system foreign) #:select (%null-pointer
+ pointer->string))
#:use-module (bytestructures guile)
#:use-module (tissue utils)
- #:export (git-top-level
+ #:export (reference-symbolic-target
+ git-top-level
%current-git-repository
current-git-repository
commit-date
@@ -48,6 +50,12 @@
(proc (diff->pointer diff) %null-pointer)
diff)))
+(define reference-symbolic-target
+ (let ((proc (libgit2->procedure '* "git_reference_symbolic_target" '(*))))
+ (lambda (reference)
+ (pointer->string
+ (proc (reference->pointer reference))))))
+
(define %current-git-repository
(make-parameter #f))