summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-06-23 18:10:10 +0530
committerArun Isaac2022-06-23 19:06:40 +0530
commite17f83d1d939df299f7377271fdcb0a8057865cd (patch)
tree6cc1fa2575f0a3aeef315e5530b585109a0c49ae
parentd2427c7a2102720e86323f17ba8da1174d40880c (diff)
downloadtissue-e17f83d1d939df299f7377271fdcb0a8057865cd.tar.gz
tissue-e17f83d1d939df299f7377271fdcb0a8057865cd.tar.lz
tissue-e17f83d1d939df299f7377271fdcb0a8057865cd.zip
git: Bind git_diff_find_similar from libgit2.
* tissue/git.scm: Import %null-pointer from (system foreign). (diff-find-similar!): New function.
-rw-r--r--tissue/git.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/tissue/git.scm b/tissue/git.scm
index c31ebd1..944842d 100644
--- a/tissue/git.scm
+++ b/tissue/git.scm
@@ -26,7 +26,8 @@
#:use-module (git types)
;; There are many name conflicts between (system foreign). So, we
;; carefully select a few and prefix the rest.
- #:use-module ((system foreign) #:select (null-pointer?
+ #:use-module ((system foreign) #:select (%null-pointer
+ null-pointer?
pointer->string
make-pointer
dereference-pointer))
@@ -159,6 +160,12 @@ return value is a list of <index-entry> objects."
(index-entry index i))
(iota (index-entry-count index))))
+(define diff-find-similar!
+ (let ((proc (libgit2->procedure* "git_diff_find_similar" '(* *))))
+ (lambda (diff)
+ (proc (diff->pointer diff) %null-pointer)
+ diff)))
+
(define (git-top-level)
"Return the top-level directory of the current git
repository."