Liking cljdoc? Tell your friends :D

hara.lib.jgit.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 ".") ;; #// "." => java.io.File

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

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

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

blobclj

(blob repo id)

gets a blob according to id

(->> (ObjectId/fromString -gitignore-id-) (blob (repository)) slurp) => #(.startsWith % "/target")

gets a blob according to id

(->> (ObjectId/fromString -gitignore-id-)
     (blob (repository))
     slurp)
=> #(.startsWith % "/target")
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 "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?
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 ".gitignore"}) slurp (.startsWith "/target")) => true

gives an inputstream for evalution

(-> (raw (repository) {:path ".gitignore"})
    slurp
    (.startsWith "/target"))
=> true
raw docstring

repositoryclj

(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?
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" "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
raw docstring

root-directoryclj

(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")
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.)) ;; "77831a03e8c6c9c0aada87412ec0efb5dadcc7bd" => string?

finds the id associated with a commit at a particular time

(time->id (repository)
          (java.util.Date.))
;; "77831a03e8c6c9c0aada87412ec0efb5dadcc7bd"
=> string?
raw docstring

tree-parserclj

(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
raw docstring

tree-walkclj

(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
raw docstring

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

× close