Liking cljdoc? Tell your friends :D

lucid.git.api.repository


*current-directory*clj


as-directoryclj

(as-directory path)

converts a string to a java.io.File object

(as-directory "project.clj") => false

(as-directory ".") ;;=> #// "."

converts a string to a `java.io.File` object

(as-directory "project.clj") => false

(as-directory ".") ;;=> #// "."
raw docstring

blobclj

(blob repo id)

gets a blob according to id

(->> (ObjectId/fromString "c81c8f4e14c252adecd1d983ce161055d253c62e") (blob (repository)) (slurp))

gets a blob according to id

(->> (ObjectId/fromString "c81c8f4e14c252adecd1d983ce161055d253c62e")
    (blob (repository))
     (slurp))
raw docstring

list-commitsclj

(list-commits repo)
(list-commits repo branch)

lists current commits for a particular repository (-> (repository) (list-commits "master") (first)) ;; => {:time #inst "2018-05-27T03:54:52.000-00:00", ;; :id "c8fa557ce252dffdfbdd5c1884cf87d41c0f222f"}

lists current commits for a particular repository
(-> (repository)
    (list-commits "master")
    (first))
;; => {:time #inst "2018-05-27T03:54:52.000-00:00",
;;     :id "c8fa557ce252dffdfbdd5c1884cf87d41c0f222f"}
raw docstring

list-filesclj

(list-files repo)
(list-files repo opts)

list files within a given branch and commit

(list-files (repository) {:commit "c8fa5" :branch "master"}) ;;=> (".gitignore" ".travis.yml" ....)

list files within a given branch and commit

(list-files (repository) {:commit "c8fa5"
                          :branch "master"})
;;=> (".gitignore" ".travis.yml" ....) 
raw docstring

parse-head-stringclj

(parse-head-string x)

helper function for resolve-id

helper function for `resolve-id`
raw docstring

rawclj

(raw repo opts)

gives an inputstream for evalution

(-> (raw (repository) {:path "project.clj"}) (slurp))

gives an inputstream for evalution

(-> (raw (repository) {:path "project.clj"})
   (slurp))
raw docstring

repositoryclj

(repository)
(repository path)

creates a repo object for path or the current directory

(repository) ;;=> #repository "/Users/chris/Development/zcaudate/lucidity/.git"

creates a repo object for `path` or the current directory

(repository)
;;=> #repository "/Users/chris/Development/zcaudate/lucidity/.git"
raw docstring

repository?clj

(repository? obj)

checks if the object is a repository

(repository? (repository)) => true

checks if the object is a repository

(repository? (repository))
=> true
raw docstring

resolve-idclj

(resolve-id repo branch x)

resolves to an id given a date or a string

(resolve-id (repository) "master" "c8fa5") ;;=> #id "c8fa557ce252dffdfbdd5c1884cf87d41c0f222f"

resolves to an id given a date or a string

(resolve-id (repository) "master" "c8fa5")
;;=> #id "c8fa557ce252dffdfbdd5c1884cf87d41c0f222f"
raw docstring

root-directoryclj

(root-directory path)

finds the root .git repo of a given path

(root-directory "src/lucid/git/api/") => (as-directory ".git")

(root-directory ".") => (as-directory ".git")

finds the root `.git` repo of a given path

(root-directory "src/lucid/git/api/")
=> (as-directory ".git")

(root-directory ".")
=> (as-directory ".git")
raw docstring

time->idclj

(time->id repo t)
(time->id repo branch t)

finds the id associated with a commit at a particular time

(time->id (repository) (java.util.Date.)) ;=> "c8fa557ce252dffdfbdd5c1884cf87d41c0f222f"

finds the id associated with a commit at a particular time

(time->id (repository)
          (java.util.Date.))
;=> "c8fa557ce252dffdfbdd5c1884cf87d41c0f222f"
raw docstring

tree-parserclj

(tree-parser repo)
(tree-parser repo opts)

creates a TreeInterator for diff operations

(tree-parser (repository) {:commit "c8fa5" :branch "master"})

creates a `TreeInterator` for diff operations

(tree-parser (repository) {:commit "c8fa5"
                          :branch "master"})
raw docstring

tree-walkclj

(tree-walk repo)
(tree-walk repo opts)

initialises the TreeWalk object for exploring commits

(tree-walk (repository))

initialises the `TreeWalk` object for exploring commits

(tree-walk (repository))
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close