(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 ".") ;;=> #// "."
(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))(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"}
(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" ....)
(parse-head-string x)helper function for resolve-id
helper function for `resolve-id`
(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))(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"
(repository? obj)checks if the object is a repository
(repository? (repository)) => true
checks if the object is a repository (repository? (repository)) => true
(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"
(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")
(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"
(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"})(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))
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |