aboutsummaryrefslogtreecommitdiff
path: root/module/git.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-06-01 21:31:37 +0200
committerHugo Hörnquist <hugo@hornquist.se>2019-06-01 21:31:37 +0200
commitc7dde38d90e9525ccb360fa379667087cecfd687 (patch)
tree8b5697c903b32ab5de2b161fc4fa807f306420b4 /module/git.scm
parentReword how statprof is loaded. (diff)
downloadcalp-c7dde38d90e9525ccb360fa379667087cecfd687.tar.gz
calp-c7dde38d90e9525ccb360fa379667087cecfd687.tar.xz
Move get-git-version to new git module.
Diffstat (limited to 'module/git.scm')
-rw-r--r--module/git.scm12
1 files changed, 12 insertions, 0 deletions
diff --git a/module/git.scm b/module/git.scm
new file mode 100644
index 00000000..dfb60526
--- /dev/null
+++ b/module/git.scm
@@ -0,0 +1,12 @@
+(define-module (git)
+ :use-module (util)
+ :use-module ((ice-9 rdelim) :select (read-line))
+ :use-module ((ice-9 popen) :select (open-input-pipe))
+ :export (get-git-version))
+
+(define (get-git-version)
+ (-> "git rev-parse HEAD"
+ open-input-pipe
+ read-line))
+
+