summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-07-04 00:36:23 +0530
committerArun Isaac2022-07-04 17:28:25 +0530
commit49b767c5f462dc12da4e80db70e99884f054052f (patch)
treef0b1608f13727f38eb216913c398f4d33832eaad
parent719bf34be42a0156d194f17bd76c2ef94fb424b3 (diff)
downloadtissue-49b767c5f462dc12da4e80db70e99884f054052f.tar.gz
tissue-49b767c5f462dc12da4e80db70e99884f054052f.tar.lz
tissue-49b767c5f462dc12da4e80db70e99884f054052f.zip
git: Add clone-options utility.
* tissue/git.scm: Import (bytestructures guile). (clone-options): New function.
-rw-r--r--tissue/git.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/tissue/git.scm b/tissue/git.scm
index 69e8cb6..c7bf351 100644
--- a/tissue/git.scm
+++ b/tissue/git.scm
@@ -28,13 +28,15 @@
#:use-module (git)
#:use-module (git types)
#:use-module ((system foreign) #:select (%null-pointer))
+ #:use-module (bytestructures guile)
#:use-module (tissue utils)
#:export (git-top-level
current-git-repository
commit-date
git-tracked-files
call-with-file-in-git
- file-modification-table))
+ file-modification-table
+ clone-options))
;; We bind additional functions from libgit2 that are not already
;; bound in guile-git. TODO: Contribute them to guile-git.
@@ -138,3 +140,11 @@ that modified them."
#f
repository)
result))
+
+(define* (clone-options #:key bare?)
+ (let ((clone-options (make-clone-options)))
+ (bytestructure-set!
+ (clone-options-bytestructure clone-options)
+ 'bare
+ (if bare? 1 0))
+ clone-options))