 (defn branch [b]
   (let [filepath (str (git-root) "refs/heads/" b)]
     (clojure.string/replace (slurp filepath) #"\n" "")))
+
+(defn head []
+  (let [filepath (str (git-root) "HEAD")
+        full-branch (clojure.string/replace (slurp filepath) #"\n" "")
+        branch-name (-> full-branch (clojure.string/split #"\/") (last))]
+    (branch branch-name)))
 
 (defn validarte-index [] nil)
 

        [top-hash objs] (files-map-to-objs files-map)]
    [top-hash objs]))




(defn to-str [x] (apply str (map char x)))

(defn current-unix-time []
  (quot (System/currentTimeMillis) 1000))

(defn ok-sh [command & args]
  (let [res (apply sh (cons command args))]
    (assert (= 0 (:exit res)))
