Commit 8ad6c65df662b1e32ed819b9bf4c5d8ee6c5fcbe

Thomas de Grivel 2018-01-20T22:27:19

Remove empty string in git invocation.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/repo.lisp b/repo.lisp
index 1bba699..ffda074 100644
--- a/repo.lisp
+++ b/repo.lisp
@@ -252,9 +252,13 @@
 (defgeneric $git-pull (repo))
 
 (defmethod $git-checkout ((repo git-repo))
-  (let ((local (repo-local-dir repo))
-        (head (repo-head repo)))
-    ($git "-C" (translate-home local) "checkout" (str head))
+  (let* ((local (repo-local-dir repo))
+         (head (repo-head repo))
+         (str-head (str head))
+         (args `("-C" ,(translate-home local) "checkout"
+                      ,@(unless (= 0 (length str-head))
+                          '(str-head)))))
+    (apply #'$git args)
     nil))
 
 (defmethod $git-clone ((repo git-repo))