Liking cljdoc? Tell your friends :D

clj-jgit.util


doseq-cmd-fn!clj

(doseq-cmd-fn! cmd-instance f param-seq)

Repeatedly executes function f for each entry in param-seq. The function is passed the cmd-instance as first arg and a single param-seq entry as second arg. If param-seq isn't sequential? it's wrapped into a vector. Returns given cmd-instance.

Example that executes .addFilepattern on a JGit AddCommand instance for each given file, nicely threaded:

(-> (.add repo)
  (doseq-cmd-fn! #(.addFilepattern ^AddCommand %1 %2) ["file1.txt" "file2.txt"])
  (.call))
Repeatedly executes function `f` for each entry in `param-seq`. The function is passed the `cmd-instance` as first
arg and a single `param-seq` entry as second arg. If `param-seq` isn't sequential? it's wrapped into a vector.
Returns given `cmd-instance`.

Example that executes `.addFilepattern` on a JGit AddCommand instance for each given file, nicely threaded:

    (-> (.add repo)
      (doseq-cmd-fn! #(.addFilepattern ^AddCommand %1 %2) ["file1.txt" "file2.txt"])
      (.call))
sourceraw docstring

name-from-uriclj

(name-from-uri uri)

Given a URI to a Git resource, derive the name (for use in cloning to a directory)

Given a URI to a Git resource, derive the name (for use in cloning to a directory)
sourceraw docstring

normalize-pathclj

(normalize-path path)

Removes a leading slash from a path

Removes a leading slash from a path
sourceraw docstring

person-identclj

(person-ident person)

Convert given JGit PersonIdent object into a map

Convert given JGit `PersonIdent` object into a map
sourceraw docstring

recursive-delete-fileclj

(recursive-delete-file f & [silently])

Delete file f. If f is a directory, recursively deletes all files and directories within the directory. Raises an exception if it fails, unless silently is true.

Delete file `f`. If `f` is a directory, recursively deletes all files and directories within the directory. Raises an
exception if it fails, unless `silently` is true.
sourceraw docstring

seq?!clj

(seq?! obj)

If given obj isn't sequential? returns a vec with obj as single element, else just returns it's input.

If given `obj` isn't sequential? returns a vec with `obj` as single element, else just returns it's input.
sourceraw docstring

when-presentcljmacro

(when-present obj & body)

Special when macro for checking if an attribute isn't available or is an empty string

Special `when` macro for checking if an attribute isn't available or is an empty string
sourceraw docstring

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

× close