1.2.0 permalink Arrow_down_16x16

read-git-head

leiningen.pom

  • (read-git-head git-dir)
Reads the value of HEAD and returns a commit SHA1.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source leiningen/pom.clj:21 top

(defn read-git-head
  "Reads the value of HEAD and returns a commit SHA1."
  [git-dir]
  (let [head (.trim (slurp (str (file git-dir "HEAD"))))]
    (if-let [ref-path (second (re-find #"ref: (\S+)" head))]
      (read-git-ref git-dir ref-path)
      head)))
Vars in leiningen.pom/read-git-head: defn if-let let
Used in 0 other vars

Comments top

No comments for read-git-head. Log in to add a comment.