ClojureDocs

Nav

Namespaces

git-process

  • (git-process params)
Run git process in the specified dir using git-command with git-args (which should not
start with "git"). git-args may either be a string (split on whitespace) or a vector
of strings. By default, stdout is captured, trimmed, and returned.
 Options:
  :dir - dir to invoke this command from, default = current directory
  :git-command - git command to use, default = "git"
  :git-args - required, coll of git-arg strings forming a command line OR
              a string (do not use if args may have embedded spaces)
  :capture - :out (default) or :err, else nothing
 Examples:
  (api/git-process {:git-args "rev-list HEAD --count"})
  (api/git-process {:git-args "branch --show-current"})
  (api/git-process {:git-args "rev-parse --short HEAD"})
  (api/git-process {:git-args "push", :capture nil})