(apply-with-coercion {:keys [params] :as ele} args)
applies inputs with coercion included (let [init-command (Git/init) set-dir (reflect/query-class init-command [:# "setGitDir"])] (->> (apply-with-coercion set-dir [init-command ".git"]) (reflect/delegate) (into {}))) => {:directory nil, :bare false, :gitDir (io/file ".git")}
applies inputs with coercion included (let [init-command (Git/init) set-dir (reflect/query-class init-command [:# "setGitDir"])] (->> (apply-with-coercion set-dir [init-command ".git"]) (reflect/delegate) (into {}))) => {:directory nil, :bare false, :gitDir (io/file ".git")}
(command all-commands [input & more])
returns a command based on keyword input
(command (git-all-commands) [:checkout]) ;;=> [#[checkout :: (org.eclipse.jgit.api.Git) -> org.eclipse.jgit.api.CheckoutCommand] nil]
returns a command based on keyword input (command (git-all-commands) [:checkout]) ;;=> [#[checkout :: (org.eclipse.jgit.api.Git) -> org.eclipse.jgit.api.CheckoutCommand] nil]
(command-initialize-inputs command inputs)
initialize inputs for a particular command (->> (Git/init) (reflect/delegate) (into {})) => {:directory nil, :bare false, :gitDir nil}
(-> (Git/init) (command-initialize-inputs [:bare true :git-dir (io/file ".git")]) (reflect/delegate) (->> (into {}))) => {:directory nil, :bare true, :gitDir (io/file ".git")}
initialize inputs for a particular command (->> (Git/init) (reflect/delegate) (into {})) => {:directory nil, :bare false, :gitDir nil} (-> (Git/init) (command-initialize-inputs [:bare true :git-dir (io/file ".git")]) (reflect/delegate) (->> (into {}))) => {:directory nil, :bare true, :gitDir (io/file ".git")}
(command-input opt)
grabs the input type for a particular command
(-> (Git/init) (command-options) :bare (command-input)) => Boolean/TYPE
(-> (Git/init) (command-options) :directory (command-input)) => java.lang.String
grabs the input type for a particular command (-> (Git/init) (command-options) :bare (command-input)) => Boolean/TYPE (-> (Git/init) (command-options) :directory (command-input)) => java.lang.String
(command-options command)
list options for a particular command
(->> (command-options (Git/init)) (reduce-kv (fn [m k v] (assoc m k (command-input v))) {})) => {:git-dir String, :directory String, :bare Boolean/TYPE}
list options for a particular command (->> (command-options (Git/init)) (reduce-kv (fn [m k v] (assoc m k (command-input v))) {})) => {:git-dir String, :directory String, :bare Boolean/TYPE}
(git-all-commands)
list all commands that work with git (-> (git-all-commands) keys sort) => '(:add :apply :archive :blame :branch :checkout :cherry :clean :clone :commit :describe :diff :fetch :gc :init :log :ls :merge :name :notes :pull :push :rebase :reflog :remote :reset :revert :rm :stash :status :submodule :tag)
(->> (git-all-commands) (filter (fn [[k v]] (not (empty? v)))) (into {})) => {:cherry #{:pick}, :name #{:rev}, :submodule #{:init :update :sync :status :add}, :ls #{:remote}, :clone #{:repository}, :notes #{:remove :list :add :show}, :remote #{:add :list :remove :set}, :stash #{:create :drop :list :apply}, :tag #{:delete :list}, :branch #{:create :delete :rename :list}}
list all commands that work with git (-> (git-all-commands) keys sort) => '(:add :apply :archive :blame :branch :checkout :cherry :clean :clone :commit :describe :diff :fetch :gc :init :log :ls :merge :name :notes :pull :push :rebase :reflog :remote :reset :revert :rm :stash :status :submodule :tag) (->> (git-all-commands) (filter (fn [[k v]] (not (empty? v)))) (into {})) => {:cherry #{:pick}, :name #{:rev}, :submodule #{:init :update :sync :status :add}, :ls #{:remote}, :clone #{:repository}, :notes #{:remove :list :add :show}, :remote #{:add :list :remove :set}, :stash #{:create :drop :list :apply}, :tag #{:delete :list}, :branch #{:create :delete :rename :list}}
(git-element keywords)
gets an element based on hara.reflect
(git-element [:checkout]) ;;=> #[checkout :: (org.eclipse.jgit.api.Git) -> org.eclipse.jgit.api.CheckoutCommand]
gets an element based on `hara.reflect` (git-element [:checkout]) ;;=> #[checkout :: (org.eclipse.jgit.api.Git) -> org.eclipse.jgit.api.CheckoutCommand]
(may-coerce param arg)
if possible, coerce the value into the type, else throw exception
(may-coerce java.io.File "path") ;;=> #// "path"
if possible, coerce the value into the type, else throw exception (may-coerce java.io.File "path") ;;=> #// "path"
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close