(as-directory path)converts a string to a java.io.File object
(as-directory "project.clj") => false
(as-directory ".") ;; #// "." => java.io.File
converts a string to a `java.io.File` object (as-directory "project.clj") => false (as-directory ".") ;; #// "." => java.io.File
(blob repo id)gets a blob according to id
(->> (ObjectId/fromString -project-id-) (blob (repository)) (slurp) (read-string) (second)) => 'hara
gets a blob according to id
(->> (ObjectId/fromString -project-id-)
(blob (repository))
(slurp)
(read-string)
(second))
=> 'hara(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 "77831a" :branch "master"}) ;;=> (".gitignore" ".travis.yml" ....) => vector?
list files within a given branch and commit
(list-files (repository) {:commit "77831a"
:branch "master"})
;;=> (".gitignore" ".travis.yml" ....)
=> vector?(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) (read-string) (second)) => 'hara
gives an inputstream for evalution
(-> (raw (repository) {:path "project.clj"})
(slurp)
(read-string)
(second))
=> 'hara(repository)(repository path)creates a repo object for path or the current directory
(repository) ;; #repository "/Users/chris/Development/base/.git" => repository?
creates a repo object for `path` or the current directory (repository) ;; #repository "/Users/chris/Development/base/.git" => repository?
(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" "77831a") ;; #id "77831a03e8c6c9c0aada87412ec0efb5dadcc7bd" => org.eclipse.jgit.lib.ObjectId
resolves to an id given a date or a string (resolve-id (repository) "master" "77831a") ;; #id "77831a03e8c6c9c0aada87412ec0efb5dadcc7bd" => org.eclipse.jgit.lib.ObjectId
(root-directory path)finds the root .git repo of a given path
(root-directory "src/hara/lib/jgit/api/") => (as-directory ".git")
(root-directory ".") => (as-directory ".git")
finds the root `.git` repo of a given path (root-directory "src/hara/lib/jgit/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.)) ;; "77831a03e8c6c9c0aada87412ec0efb5dadcc7bd" => string?
finds the id associated with a commit at a particular time
(time->id (repository)
(java.util.Date.))
;; "77831a03e8c6c9c0aada87412ec0efb5dadcc7bd"
=> string?(tree-parser repo)(tree-parser repo opts)creates a TreeInterator for diff operations
(tree-parser (repository) {:commit "77831a" :branch "master"}) => org.eclipse.jgit.treewalk.CanonicalTreeParser
creates a `TreeInterator` for diff operations
(tree-parser (repository) {:commit "77831a"
:branch "master"})
=> org.eclipse.jgit.treewalk.CanonicalTreeParser(tree-walk repo)(tree-walk repo opts)initialises the TreeWalk object for exploring commits
(tree-walk (repository)) => org.eclipse.jgit.treewalk.TreeWalk
initialises the `TreeWalk` object for exploring commits (tree-walk (repository)) => org.eclipse.jgit.treewalk.TreeWalk
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 |