Liking cljdoc? Tell your friends :D

clj-jgit.porcelain


*credentials*clj


*ssh-exclusive-identity*clj


*ssh-identities*clj


*ssh-identity-name*clj


*ssh-passphrase*clj


*ssh-prvkey*clj


*ssh-pubkey*clj


*ssh-session-config*clj


blame-resultclj

(blame-result blame)

branch-list-modesclj


branch-rebase-modesclj


branch-upstream-modesclj


checkout-stage-modesclj


clone-cmdclj

(clone-cmd uri)

diff-supported-algorithmsclj


discover-repocljmultimethod

Discover a Git repository in a path.

Discover a Git repository in a path.
raw docstring

fetch-cmdclj

(fetch-cmd repo)

fetch-recurse-submodules-modesclj


get-blobclj

(get-blob repo commit path)

get-blob-idclj

(get-blob-id repo commit path)

git-addclj

(git-add repo
         file-patterns
         &
         {:keys [update? working-tree-iterator]
          :or {update? false working-tree-iterator nil}})

Add file contents to the index. file-patterns is either a String with a repository-relative path of the file/directory to be added or coll of Strings with paths. If a directory name is given all files in the directory are added recursively. Fileglobs (e.g. *.txt) are not yet supported.

Options: :update? If set to true, the command only matches file-patterns against already tracked files in the index rather than the working tree. That means that it will never stage new files, but that it will stage modified new contents of tracked files and that it will remove files from the index if the corresponding files in the working tree have been removed. (default: false) :working-tree-iterator Set the WorkingTreeIterator to be used. If nil a standard FileTreeIterator is used. (default: nil)

Add file contents to the index. `file-patterns` is either a String with a repository-relative path of the
file/directory to be added or coll of Strings with paths. If a directory name is given all files in the directory are
added recursively. Fileglobs (e.g. *.txt) are not yet supported.

Options:
  :update?                If set to true, the command only matches `file-patterns` against already tracked files in
                          the index rather than the working tree. That means that it will never stage new files, but
                          that it will stage modified new contents of tracked files and that it will remove files from
                          the index if the corresponding files in the working tree have been removed. (default: false)
  :working-tree-iterator  Set the WorkingTreeIterator to be used. If nil a standard FileTreeIterator is used.
                          (default: nil)
raw docstring

git-blameclj

(git-blame repo
           path
           &
           {:keys [diff-algo follow-mv? jgit? reverse start text-comparator]
            :or {diff-algo nil
                 follow-mv? false
                 jgit? false
                 reverse nil
                 start nil
                 text-comparator nil}})

Show blame result for given path.

Options: :diff-algo Keyword that sets the used diff algorithm, supported algorithms: :histogram :myers (default: nil) :follow-mv? If true renames are followed using the standard FollowFilter behavior used by RevWalk (which matches git log --follow in the C implementation). This is not the same as copy/move detection as implemented by the C implementation's of git blame -M -C. (default: false) :jgit? If true returns the JGit object instead. (default: false) :reverse Compute reverse blame (history of deletes). Map of format {:start Resolvable :end Resolvable}: :start Oldest commit to traverse from. Result file will be loaded from this commit's tree. :end Most recent commit(s) to stop traversal at. Usually an active branch tip, tag, or HEAD. Accepts a single Resolvable or a coll with those. (default: nil) :start A Resolvable that sets the start commit. (default: nil) :text-comparator Pass a JGit RawTextComparator. (default: nil)

Show blame result for given `path`.

Options:
  :diff-algo        Keyword that sets the used diff algorithm, supported algorithms:
                      :histogram
                      :myers
                    (default: nil)
  :follow-mv?       If true renames are followed using the standard FollowFilter behavior used by RevWalk
                    (which matches git log --follow in the C implementation). This is not the same as copy/move
                    detection as implemented by the C implementation's of git blame -M -C. (default: false)
  :jgit?            If true returns the JGit object instead. (default: false)
  :reverse          Compute reverse blame (history of deletes). Map of format {:start Resolvable :end Resolvable}:
                      :start  Oldest commit to traverse from. Result file will be loaded from this commit's tree.
                      :end    Most recent commit(s) to stop traversal at. Usually an active branch tip, tag, or
                              HEAD. Accepts a single Resolvable or a coll with those.
                    (default: nil)
  :start            A Resolvable that sets the start commit. (default: nil)
  :text-comparator  Pass a JGit RawTextComparator. (default: nil)
raw docstring

git-branch-attached?clj

(git-branch-attached? repo)

Is the current repo on a branch (true) or in a detached HEAD state?

Is the current repo on a branch (true) or in a detached HEAD state?
raw docstring

git-branch-createclj

(git-branch-create repo
                   branch-name
                   &
                   {:keys [force? start-point upstream-mode]
                    :or {force? false start-point nil upstream-mode nil}})

Create a new local branch.

Options: :force? If true and the branch with the given name already exists, the start-point of an existing branch will be set to a new :start-point; if false, the existing branch will not be changed. (default: false) :start-point String that corresponds to the start-point option; if null, the current HEAD will be used. (default: nil) :upstream-mode Optional keyword that configures branch tracking: :no-track :set-upstream :track (default: nil)

Create a new local branch.

Options:
  :force?         If true and the branch with the given name already exists, the start-point of an existing branch
                  will be set to a new :start-point; if false, the existing branch will not be changed.
                  (default: false)
  :start-point    String that corresponds to the start-point option; if null, the current HEAD will be used.
                  (default: nil)
  :upstream-mode  Optional keyword that configures branch tracking:
                    :no-track
                    :set-upstream
                    :track
                  (default: nil)
raw docstring

git-branch-currentclj

(git-branch-current repo & {:keys [jgit?] :or {jgit? false}})

The current branch name of given repo.

Options: :jgit? If true returns the unmodified output by JGit. (default: false)

The current branch name of given repo.

Options:
  :jgit?      If true returns the unmodified output by JGit. (default: false)
raw docstring

git-branch-deleteclj

(git-branch-delete repo branch-names & {:keys [force?] :or {force? false}})

Delete one or several branches. branch-names may be either a string or a coll of strings. The result is a list with the (full) names of the deleted branches. Note that we don't have a option corresponding to the -r option; remote tracking branches are simply deleted just like local branches.

Options: :force? true corresponds to the -D option, false to the -d option. If false a check will be performed whether the branch to be deleted is already merged into the current branch and deletion will be refused in this case. (default: false)

Delete one or several branches. `branch-names` may be either a string or a coll of strings. The result is a list with
the (full) names of the deleted branches. Note that we don't have a option corresponding to the -r option; remote
tracking branches are simply deleted just like local branches.

Options:
  :force? true corresponds to the -D option, false to the -d option. If false a check will be performed whether the
          branch to be deleted is already merged into the current branch and deletion will be refused in this case.
          (default: false)
raw docstring

git-branch-listclj

(git-branch-list repo
                 &
                 {:keys [jgit? list-mode] :or {jgit? false list-mode :local}})

Get a list of branch names for given repo. Returns a seq of strings.

Options: :jgit? If true returns a seq with JGit objects instead. (default: false) :list-mode :all, :local or :remote (default: :local)

Get a list of branch names for given repo. Returns a seq of strings.

Options:
  :jgit?      If true returns a seq with JGit objects instead. (default: false)
  :list-mode  :all, :local or :remote (default: :local)
raw docstring

git-checkoutclj

(git-checkout repo
              &
              {:keys [all-paths? create-branch? force? monitor name orphan?
                      paths stage start-point upstream-mode]
               :or {all-paths? false
                    create-branch? false
                    start-point nil
                    stage nil
                    name nil
                    paths nil
                    upstream-mode nil
                    force? false
                    monitor nil
                    orphan? false}})

Checkout a branch to the working tree.

Options: :all-paths? Do a path checkout on the entire repository. If this option is set, neither the :create-branch? nor :name option is considered. In other words, these options are exclusive. (default: false) :create-branch? If true a branch will be created as part of the checkout and set to the specified :start-point. (default: false) :force? If true and the branch with the given name already exists, the start-point of an existing branch will be set to a new start-point; if false, the existing branch will not be changed. (default: false) :monitor Set a progress monitor. See JGit ProgressMonitor interface. (default: nil) :name The name of the branch or commit to check out, or the new branch name. When only checking out paths and not switching branches, use :start-point to specify from which branch or commit to check out files. When :create-branch? is set to true, use this option to set the name of the new branch to create and :start-point to specify the start point of the branch. (default: nil) :orphan? Whether to create a new orphan branch. If true , the name of the new orphan branch must be set using :name. The commit at which to start the new orphan branch can be set using :start-point; if not specified, "HEAD" is used. (default: false) :paths String or coll of strings with path(s) to check out. If this option is set, neither the :create-branch? nor :name option is considered. In other words, these options are exclusive. (default: nil) :stage When checking out the index, check out the specified stage for unmerged paths. This can not be used when checking out a branch, only when checking out the index. Keywords: :base Base stage (#1) :ours Ours stage (#2) :theirs Theirs stage (#3) (default: nil) :start-point String that corresponds to the start-point option. When checking out :paths and this is not specified or null, the index is used. When creating a new branch, this will be used as the start point. If null, the current HEAD will be used. (default: nil) :upstream-mode Optional keyword that configures branch tracking when creating a new branch with :create-branch?. Modes are: :no-track :set-upstream :track (default: nil)

Usage examples: Check out an existing branch:

(git-checkout repo :name "feature");

Check out paths from the index:

(git-checkout repo :paths ["file1.txt" "file2.txt"]);

Check out a path from a commit:

(git-checkout repo :start-point "HEAD" :paths "file1.txt");

Create a new branch and make it the current branch:

(git-checkout repo :create-branch? true :name "newbranch");

Create a new tracking branch for a remote branch and make it the current branch:

(git-checkout repo :create-branch? true :name "stable" :upstream-mode :set-upstream :start-point "origin/stable");
Checkout a branch to the working tree.

Options:
  :all-paths?     Do a path checkout on the entire repository. If this option is set, neither the :create-branch? nor
                  :name option is considered. In other words, these options are exclusive. (default: false)
  :create-branch? If true a branch will be created as part of the checkout and set to the specified :start-point.
                  (default: false)
  :force?         If true and the branch with the given name already exists, the start-point of an existing branch
                  will be set to a new start-point; if false, the existing branch will not be changed. (default: false)
  :monitor        Set a progress monitor. See JGit ProgressMonitor interface. (default: nil)
  :name           The name of the branch or commit to check out, or the new branch name.  When only checking out paths
                  and not switching branches, use :start-point to specify from which branch or commit to check out
                  files. When :create-branch? is set to true, use this option to set the name of the new branch to
                  create and :start-point to specify the start point of the branch. (default: nil)
  :orphan?        Whether to create a new orphan branch. If true , the name of the new orphan branch must be set using
                  :name. The commit at which to start the new orphan branch can be set using :start-point; if not
                  specified, "HEAD" is used. (default: false)
  :paths          String or coll of strings with path(s) to check out. If this option is set, neither the
                  :create-branch? nor :name option is considered. In other words, these options are exclusive.
                  (default: nil)
  :stage          When checking out the index, check out the specified stage for unmerged paths. This can not be used
                  when checking out a branch, only when checking out the index. Keywords:
                    :base     Base stage (#1)
                    :ours     Ours stage (#2)
                    :theirs   Theirs stage (#3)
                  (default: nil)
  :start-point    String that corresponds to the start-point option. When checking out :paths and this is not
                  specified or null, the index is used. When creating a new branch, this will be used as the start
                  point. If null, the current HEAD will be used. (default: nil)
  :upstream-mode  Optional keyword that configures branch tracking when creating a new branch with `:create-branch?`.
                  Modes are:
                    :no-track
                    :set-upstream
                    :track
                  (default: nil)

Usage examples:
  Check out an existing branch:

    (git-checkout repo :name "feature");

  Check out paths from the index:

    (git-checkout repo :paths ["file1.txt" "file2.txt"]);

  Check out a path from a commit:

    (git-checkout repo :start-point "HEAD" :paths "file1.txt");

  Create a new branch and make it the current branch:

    (git-checkout repo :create-branch? true :name "newbranch");

  Create a new tracking branch for a remote branch and make it the current branch:

    (git-checkout repo :create-branch? true :name "stable" :upstream-mode :set-upstream :start-point "origin/stable");
raw docstring

git-cherry-pickclj


git-cleanclj

(git-clean repo
           &
           {:keys [dirs? dry-run? force? ignore? paths]
            :or
              {dirs? false dry-run? false force? false ignore? true paths nil}})

Remove untracked files from the working tree.

Options: :dirs? If true directories are also cleaned. (default: false) :dry-run? When true the paths in question will not actually be deleted. (default: false) :force? If force is set, directories that are git repositories will also be deleted. (default: false) :ignore? Don't report/clean files or dirs that are ignored by a .gitignore. (default: true) :paths String or coll of strings with repository-relative paths to limit the cleaning to. (default: nil)

Remove untracked files from the working tree.

Options:
  :dirs?      If true directories are also cleaned. (default: false)
  :dry-run?   When true the paths in question will not actually be deleted. (default: false)
  :force?     If force is set, directories that are git repositories will also be deleted. (default: false)
  :ignore?    Don't report/clean files or dirs that are ignored by a `.gitignore`. (default: true)
  :paths      String or coll of strings with repository-relative paths to limit the cleaning to. (default: nil)
raw docstring

git-cloneclj

(git-clone uri
           &
           {:keys [bare? branch callback clone-all? clone-branches clone-subs?
                   dir git-dir no-checkout? monitor remote]
            :or {branch "master"
                 callback nil
                 remote nil
                 bare? false
                 clone-branches nil
                 dir nil
                 clone-subs? false
                 clone-all? true
                 git-dir nil
                 no-checkout? false
                 monitor nil}})

Clone a repository into a new working directory from given uri.

Options: :bare? Whether the cloned repository shall be bare. (default: false) :branch The initial branch to check out when cloning the repository. Can be specified as ref name ("refs/heads/master"), branch name ("master") or tag name ("v1.2.3"). If set to nil "HEAD" is used. (default: "master") :callback Register a progress callback. See JGit CloneCommand.Callback interface. (default: nil) :clone-all? Whether all branches have to be fetched. (default: true) :clone-branches String or coll strings of branch(es) to clone. Ignored when :clone-all? is true. Branches must be specified as full ref names (e.g. "refs/heads/master"). (default: nil) :clone-subs? If true; initialize and update submodules. Ignored when :bare? is true. (default: false) :dir The optional directory associated with the clone operation. If the directory isn't set, a name associated with the source uri will be used. (default: nil) :git-dir The repository meta directory (.git). (default: nil = automatic) :no-checkout? If set to true no branch will be checked out after the clone. This enhances performance of the clone command when there is no need for a checked out branch. (default: false) :monitor Set a progress monitor. See JGit ProgressMonitor interface. (default: nil) :remote The remote name used to keep track of the upstream repository for the clone operation. If no remote name is set, "origin" is used. (default: nil)

Clone a repository into a new working directory from given `uri`.

Options:
  :bare?          Whether the cloned repository shall be bare. (default: false)
  :branch         The initial branch to check out when cloning the repository. Can be specified as ref name
                  ("refs/heads/master"), branch name ("master") or tag name ("v1.2.3"). If set to nil "HEAD"
                  is used. (default: "master")
  :callback       Register a progress callback. See JGit CloneCommand.Callback interface. (default: nil)
  :clone-all?     Whether all branches have to be fetched. (default: true)
  :clone-branches String or coll strings of branch(es) to clone. Ignored when :clone-all? is true. Branches must be
                  specified as full ref names (e.g. "refs/heads/master"). (default: nil)
  :clone-subs?    If true; initialize and update submodules. Ignored when :bare? is true. (default: false)
  :dir            The optional directory associated with the clone operation. If the directory isn't set, a name
                  associated with the source uri will be used. (default: nil)
  :git-dir        The repository meta directory (.git). (default: nil = automatic)
  :no-checkout?   If set to true no branch will be checked out after the clone. This enhances performance of the
                  clone command when there is no need for a checked out branch. (default: false)
  :monitor        Set a progress monitor. See JGit ProgressMonitor interface. (default: nil)
  :remote         The remote name used to keep track of the upstream repository for the clone operation. If no remote
                  name is set, "origin" is used. (default: nil)
raw docstring

git-commitclj

(git-commit repo
            message
            &
            {:keys [all? allow-empty? amend? author committer insert-change-id?
                    no-verify? only reflog-comment]
             :or {only nil
                  reflog-comment ""
                  all? false
                  committer nil
                  insert-change-id? false
                  author nil
                  allow-empty? true
                  no-verify? false
                  amend? false}})

Record changes to the repository.

Options: :all? If set to true the Commit command automatically stages files that have been modified and deleted, but new files not known by the repository are not affected. This corresponds to the parameter -a on the command line. (default: false) :allow-empty? Whether it should be allowed to create a commit which has the same tree as it's sole predecessor (a commit which doesn't change anything). By default when creating standard commits (without specifying paths) JGit allows to create such commits. When this flag is set to false an attempt to create an "empty" standard commit will lead to an EmptyCommitException. (default: true) :amend? Used to amend the tip of the current branch. If set to true, the previous commit will be amended. This is equivalent to --amend on the command line. (default: false) :author A map of format {:name "me" :email "me@foo.net"}. If no author is explicitly specified the author will be set to the committer or to the original author when amending. (default: nil) :committer A map of format {:name "me" :email "me@foo.net"}. If no committer is explicitly specified the committer will be deduced from config info in repository, with current time. (default: nil) :insert-change-id? If set to true a change id will be inserted into the commit message. An existing change id is not replaced. An initial change id (I000...) will be replaced by the change id. (default: nil) :no-verify? Whether this commit should be verified by the pre-commit and commit-msg hooks. (default: false) :only String or coll of strings. If set commit dedicated path(s) only. Full file paths are supported as well as directory paths; in the latter case this commits all files/directories below the specified path. (default: nil) :reflog-comment Override the message written to the reflog or pass nil to specify that no reflog should be written. If an empty string is passed Git's default reflog msg is used. (default: "")

Record changes to the repository.

Options:
  :all?                   If set to true the Commit command automatically stages files that have been modified and
                          deleted, but new files not known by the repository are not affected. This corresponds to
                          the parameter -a on the command line. (default: false)
  :allow-empty?           Whether it should be allowed to create a commit which has the same tree as it's sole
                          predecessor (a commit which doesn't change anything). By default when creating standard
                          commits (without specifying paths) JGit allows to create such commits. When this flag is
                          set to false an attempt to create an "empty" standard commit will lead to an
                          EmptyCommitException. (default: true)
  :amend?                 Used to amend the tip of the current branch. If set to true, the previous commit will be
                          amended. This is equivalent to --amend on the command line. (default: false)
  :author                 A map of format {:name "me" :email "me@foo.net"}. If no author is explicitly specified
                          the author will be set to the committer or to the original author when amending.
                          (default: nil)
  :committer              A map of format {:name "me" :email "me@foo.net"}. If no committer is explicitly
                          specified the committer will be deduced from config info in repository, with current time.
                          (default: nil)
  :insert-change-id?      If set to true a change id will be inserted into the commit message. An existing change id
                          is not replaced. An initial change id (I000...) will be replaced by the change id.
                          (default: nil)
  :no-verify?             Whether this commit should be verified by the pre-commit and commit-msg hooks. (default: false)
  :only                   String or coll of strings. If set commit dedicated path(s) only. Full file paths are
                          supported as well as directory paths; in the latter case this commits all files/directories
                          below the specified path. (default: nil)
  :reflog-comment         Override the message written to the reflog or pass nil to specify that no reflog should be
                          written. If an empty string is passed Git's default reflog msg is used. (default: "")
raw docstring

git-fetchclj

(git-fetch repo
           &
           {:keys [callback check-fetched? dry-run? force? monitor recurse-subs
                   ref-specs remote rm-deleted-refs? tag-opt thin?]
            :or {tag-opt nil
                 callback nil
                 rm-deleted-refs? nil
                 remote nil
                 ref-specs nil
                 thin? true
                 dry-run? false
                 check-fetched? false
                 force? false
                 recurse-subs nil
                 monitor nil}})

Fetch changes from upstream repository.

Options: :callback Register a progress callback. See JGit FetchCommand.Callback interface. (default: nil) :check-fetched? If set to true, objects received will be checked for validity. (default: false) :dry-run? Whether to do a dry run. (default: false) :force? Update refs affected by the fetch forcefully? (default: false) :monitor Set a progress monitor. See JGit ProgressMonitor interface. (default: nil) :recurse-subs Keyword that corresponds to the --recurse-submodules/--no-recurse-submodules options. If nil use the value of the submodule.name.fetchRecurseSubmodules option configured per submodule. If not specified there, use the value of the fetch.recurseSubmodules option configured in git config. If not configured in either, :on-demand is the built-in default. :no :on-demand :yes (default: nil) :ref-specs String or coll of strings of RefSpecs to be used in the fetch operation. (default: nil) :remote The remote (uri or name) used for the fetch operation. If no remote is set "origin" is used. (default: nil) :rm-deleted-refs? If set to true, refs are removed which no longer exist in the source. If nil the Git repo config is used, if no config could be found false is used. (default: nil) :tag-opt Keyword that sets the specification of annotated tag behavior during fetch. :auto-follow Automatically follow tags if we fetch the thing they point at. :fetch-tags Always fetch tags, even if we do not have the thing it points at. :no-tags Never fetch tags, even if we have the thing it points at. (default: nil) :thin? Sets the thin-pack preference for fetch operation. (default: true)

Fetch changes from upstream repository.

Options:
  :callback           Register a progress callback. See JGit FetchCommand.Callback interface. (default: nil)
  :check-fetched?     If set to true, objects received will be checked for validity. (default: false)
  :dry-run?           Whether to do a dry run. (default: false)
  :force?             Update refs affected by the fetch forcefully? (default: false)
  :monitor            Set a progress monitor. See JGit ProgressMonitor interface. (default: nil)
  :recurse-subs       Keyword that corresponds to the --recurse-submodules/--no-recurse-submodules options. If nil
                      use the value of the submodule.name.fetchRecurseSubmodules option configured per submodule.
                      If not specified there, use the value of the fetch.recurseSubmodules option configured in
                      git config. If not configured in either, :on-demand is the built-in default.
                        :no
                        :on-demand
                        :yes
                      (default: nil)
  :ref-specs          String or coll of strings of RefSpecs to be used in the fetch operation. (default: nil)
  :remote             The remote (uri or name) used for the fetch operation. If no remote is set "origin" is used.
                      (default: nil)
  :rm-deleted-refs?   If set to true, refs are removed which no longer exist in the source. If nil the Git repo config
                      is used, if no config could be found false is used. (default: nil)
  :tag-opt            Keyword that sets the specification of annotated tag behavior during fetch.
                        :auto-follow    Automatically follow tags if we fetch the thing they point at.
                        :fetch-tags     Always fetch tags, even if we do not have the thing it points at.
                        :no-tags        Never fetch tags, even if we have the thing it points at.
                      (default: nil)
  :thin?              Sets the thin-pack preference for fetch operation. (default: true)
raw docstring

git-fetch-allclj

(git-fetch-all repo)
(git-fetch-all repo remote)

Fetch all refs from upstream repository

Fetch all refs from upstream repository
raw docstring

git-initclj

(git-init & {:keys [bare? dir git-dir] :or {bare? false dir "." git-dir nil}})

Initialize and return a new Git repository, if no options are passed a non-bare repo is created at user.dir

Options: :bare? Whether the repository is bare or not. (default: false) :dir The optional directory associated with the init operation. If no directory is set, we'll use the current directory. (default: ".") :git-dir Set the repository meta directory (.git). (default: nil)

Initialize and return a new Git repository, if no options are passed a non-bare repo is created at user.dir

Options:
  :bare?    Whether the repository is bare or not. (default: false)
  :dir      The optional directory associated with the init operation. If no directory is set, we'll use the current
            directory. (default: ".")
  :git-dir  Set the repository meta directory (.git). (default: nil)
raw docstring

git-logclj

(git-log repo
         &
         {:keys [all? jgit? max-count paths range rev-filter since skip until]
          :or {max-count nil
               range nil
               skip nil
               since nil
               rev-filter nil
               all? false
               until nil
               paths nil
               jgit? false}})

Returns a seq of maps representing the commit history for current branch of given repo. :range is equal to setting both :since and :until. To include the commit referenced by :since ObjectId in the returned seq append the ObjectId with a ^, i.e. :since "d13c67^".

Options: :all? Add all refs as commits to start the graph traversal from. (default: false) :jgit? If true returns a seq with the untouched JGit objects instead. (default: false) :max-count Limit the number of commits to output. (default: nil) :paths String or coll of strings; show only commits that affect any of the specified paths. The path must either name a file or a directory exactly and use / (slash) as separator. Note that regex expressions or wildcards are not supported. (default: nil) :range Map with format {:since Resolvable :until Resolvable}. Adds the range since..until. (default: nil) :rev-filter Set a RevFilter for the LogCommand. (default: nil) :since Same as --not until, or ^until; until being a Resolvable, i.e. "HEAD", ObjectId, etc. (default: nil) :skip Number of commits to skip before starting to show the log output. (default: nil) :until Resolvable ("master", ObjectId, etc) to start graph traversal from. (default: nil)

Returns a seq of maps representing the commit history for current branch of given repo. :range is equal to
setting both :since and :until. To include the commit referenced by `:since ObjectId` in the returned seq append
the ObjectId with a ^, i.e. `:since "d13c67^"`.

Options:
  :all?         Add all refs as commits to start the graph traversal from. (default: false)
  :jgit?        If true returns a seq with the untouched JGit objects instead. (default: false)
  :max-count    Limit the number of commits to output. (default: nil)
  :paths        String or coll of strings; show only commits that affect any of the specified paths. The path must
                either name a file or a directory exactly and use / (slash) as separator. Note that regex expressions
                or wildcards are not supported. (default: nil)
  :range        Map with format {:since Resolvable :until Resolvable}. Adds the range since..until. (default: nil)
  :rev-filter   Set a RevFilter for the LogCommand. (default: nil)
  :since        Same as --not until, or ^until; `until` being a Resolvable, i.e. "HEAD", ObjectId, etc. (default: nil)
  :skip         Number of commits to skip before starting to show the log output. (default: nil)
  :until        Resolvable ("master", ObjectId, etc) to start graph traversal from. (default: nil)
raw docstring

git-ls-remoteclj

(git-ls-remote repo
               &
               {:keys [heads? remote tags? upload-pack]
                :or {heads? false remote nil tags? false upload-pack nil}})

List references in a remote repository.

Options: :heads? Whether to include refs/heads. (default: false) :remote The remote (uri or name) used for the fetch operation. If nil, the repo config will be used. (default: nil) :tags? Whether to include refs/tags in references results. (default: false) :upload-pack The full path of executable providing the git-upload-pack service on remote host. (default: nil)

List references in a remote repository.

Options:
  :heads?         Whether to include refs/heads. (default: false)
  :remote         The remote (uri or name) used for the fetch operation. If nil, the repo config will be used.
                  (default: nil)
  :tags?          Whether to include refs/tags in references results. (default: false)
  :upload-pack    The full path of executable providing the git-upload-pack service on remote host. (default: nil)
raw docstring

git-mergeclj

(git-merge repo
           refs
           &
           {:keys [commit? ff-mode message monitor squash? strategy]
            :or {commit? true
                 ff-mode nil
                 message nil
                 monitor nil
                 squash? false
                 strategy :recursive}})

Merge refs into current branch. refs may be anything supported by the Resolvable protocol, which also includes any sequential? with Resolvable(s), i.e. ["HEAD", ObjectId, "d13c67"].

Options: :commit? true if this command should commit (this is the default behavior). false if this command should not commit. In case the merge was successful but this flag was set to false a MergeResult with status MergeResult.MergeStatus.MERGED_NOT_COMMITTED is returned. (default: true) :ff-mode Keyword that corresponds to the --ff/--no-ff/--ff-only options. If nil use the value of the merge.ff option configured in git config. If this option is not configured --ff is the built-in default. :ff :ff-only :no-ff (default: nil) :message Set the commit message to be used for the merge commit (in case one is created). (default: nil) :monitor Set a progress monitor. See JGit ProgressMonitor interface. (default: nil) :squash? If true, will prepare the next commit in working tree and index as if a real merge happened, but do not make the commit or move the HEAD. Otherwise, perform the merge and commit the result. In case the merge was successful but this flag was set to true a MergeResult with status MergeResult.MergeStatus.MERGED_SQUASHED or MergeResult.MergeStatus.FAST_FORWARD_SQUASHED is returned. (default: false) :strategy The MergeStrategy to be used. A method of combining two or more trees together to form an output tree. Different strategies may employ different techniques for deciding which paths (and ObjectIds) to carry from the input trees into the final output tree: :ours Simple strategy that sets the output tree to the first input tree. :recursive Recursive strategy to merge paths. :resolve Simple strategy to merge paths. :simple-two-way Simple strategy to merge paths, without simultaneous edits. :theirs Simple strategy that sets the output tree to the second input tree. (default: :recursive)

Merge `refs` into current branch. `refs` may be anything supported by the Resolvable protocol, which also includes
any sequential? with Resolvable(s), i.e. ["HEAD", ObjectId, "d13c67"].

Options:
  :commit?    true if this command should commit (this is the default behavior). false if this command should not
              commit. In case the merge was successful but this flag was set to false a MergeResult with status
              MergeResult.MergeStatus.MERGED_NOT_COMMITTED is returned. (default: true)
  :ff-mode    Keyword that corresponds to the --ff/--no-ff/--ff-only options. If nil use the value of the merge.ff
              option configured in git config. If this option is not configured --ff is the built-in default.
                :ff
                :ff-only
                :no-ff
              (default: nil)
  :message    Set the commit message to be used for the merge commit (in case one is created). (default: nil)
  :monitor    Set a progress monitor. See JGit ProgressMonitor interface. (default: nil)
  :squash?    If true, will prepare the next commit in working tree and index as if a real merge happened, but do not
              make the commit or move the HEAD. Otherwise, perform the merge and commit the result. In case the merge
              was successful but this flag was set to true a MergeResult with status MergeResult.MergeStatus.MERGED_SQUASHED
              or MergeResult.MergeStatus.FAST_FORWARD_SQUASHED is returned. (default: false)
  :strategy   The MergeStrategy to be used. A method of combining two or more trees together to form an output tree.
              Different strategies may employ different techniques for deciding which paths (and ObjectIds) to carry
              from the input trees into the final output tree:
                :ours             Simple strategy that sets the output tree to the first input tree.
                :recursive        Recursive strategy to merge paths.
                :resolve          Simple strategy to merge paths.
                :simple-two-way   Simple strategy to merge paths, without simultaneous edits.
                :theirs           Simple strategy that sets the output tree to the second input tree.
              (default: :recursive)
raw docstring

git-notesclj

(git-notes repo & {:keys [ref] :or {ref "commits"}})

Return list of note objects for given :ref.

Options: :ref The name of the ref in "refs/notes/" to read notes from. Note, the default value of JGit's Constants.R_NOTES_COMMITS will be used if nil is passed. (default: "commits")

Return list of note objects for given :ref.

Options:
  :ref    The name of the ref in "refs/notes/" to read notes from. Note, the default value of JGit's
          Constants.R_NOTES_COMMITS will be used if nil is passed. (default: "commits")
raw docstring

git-notes-addclj

(git-notes-add repo
               message
               &
               {:keys [commit ref] :or {commit nil ref "commits"}})

Add a note for a given :commit and :ref, replacing any existing note for that commit.

Options: :commit The RevCommit object the note should be added to. When nil the current "HEAD" is used. (default: nil) :ref The name of the ref in "refs/notes/" to read notes from. Note, the default value of JGit's Constants.R_NOTES_COMMITS will be used if nil is passed. (default: "commits")

Add a note for a given :commit and :ref, replacing any existing note for that commit.

Options:
  :commit The RevCommit object the note should be added to. When nil the current "HEAD" is used. (default: nil)
  :ref    The name of the ref in "refs/notes/" to read notes from. Note, the default value of JGit's
          Constants.R_NOTES_COMMITS will be used if nil is passed. (default: "commits")
raw docstring

git-notes-appendclj

(git-notes-append repo
                  message
                  &
                  {:keys [commit ref] :or {commit nil ref "commits"}})

Append a note for a given :commit and :ref, given message is concatenated with a char.

Options: :commit The RevCommit object the note should be added to. When nil the current "HEAD" is used. (default: nil) :ref The name of the ref in "refs/notes/" to read notes from. Note, the default value of JGit's Constants.R_NOTES_COMMITS will be used if nil is passed. (default: "commits")

Append a note for a given :commit and :ref, given message is concatenated with a 
char.

 Options:
   :commit The RevCommit object the note should be added to. When nil the current "HEAD" is used. (default: nil)
   :ref    The name of the ref in "refs/notes/" to read notes from. Note, the default value of JGit's
           Constants.R_NOTES_COMMITS will be used if nil is passed. (default: "commits")
 
raw docstring

git-notes-showclj

(git-notes-show repo & {:keys [ref] :or {ref "commits"}})

Return note string for given :ref.

Options: :ref The name of the ref in "refs/notes/" to read notes from. Note, the default value of JGit's Constants.R_NOTES_COMMITS will be used if nil is passed. (default: "commits")

Return note string for given :ref.

Options:
  :ref    The name of the ref in "refs/notes/" to read notes from. Note, the default value of JGit's
          Constants.R_NOTES_COMMITS will be used if nil is passed. (default: "commits")
raw docstring

git-pullclj

(git-pull repo
          &
          {:keys [ff-mode monitor rebase-mode recurse-subs remote remote-branch
                  strategy tag-opt]
           :or {ff-mode nil
                monitor nil
                rebase-mode nil
                recurse-subs nil
                remote nil
                remote-branch nil
                strategy :recursive
                tag-opt nil}})

Fetch from and integrate with another repository or a local branch.

Options: :ff-mode Keyword that corresponds to the --ff/--no-ff/--ff-only options. If nil use the value of pull.ff configured in git config. If pull.ff is not configured fall back to the value of merge.ff. If merge.ff is not configured --ff is the built-in default. :ff :ff-only :no-ff (default: nil) :monitor Set a progress monitor. See JGit ProgressMonitor interface. (default: nil) :rebase-mode Keyword that sets the rebase mode to use after fetching: :rebase Equivalent to --rebase: use rebase instead of merge after fetching. :preserve Equivalent to --preserve-merges: rebase preserving local merge commits. :interactive Equivalent to --interactive: use interactive rebase. :none Equivalent to --no-rebase: merge instead of rebasing. When nil use the setting defined in the git configuration, either branch.[name].rebase or, if not set, pull.rebase. This setting overrides the settings in the configuration file. (default: nil) :recurse-subs Corresponds to the --recurse-submodules/--no-recurse-submodules options. If nil use the value of the submodule.name.fetchRecurseSubmodules option configured per submodule. If not specified there, use the value of the fetch.recurseSubmodules option configured in git config. If not configured in either, :on-demand is the built-in default. :no :on-demand :yes (default: nil) :remote The remote (uri or name) to be used for the pull operation. If no remote is set, the branch's configuration will be used. If the branch configuration is missing "origin" is used. (default: nil) :remote-branch The remote branch name to be used for the pull operation. If nil, the branch's configuration will be used. If the branch configuration is missing the remote branch with the same name as the current branch is used. (default: nil) :strategy Keyword that sets the merge strategy to use during this pull operation: :ours Simple strategy that sets the output tree to the first input tree. :recursive Recursive strategy to merge paths. :resolve Simple strategy to merge paths. :simple-two-way Simple strategy to merge paths, without simultaneous edits. :theirs Simple strategy that sets the output tree to the second input tree. (default: :recursive) :tag-opt Keyword that sets the specification of annotated tag behavior during fetch: :auto-follow Automatically follow tags if we fetch the thing they point at. :fetch-tags Always fetch tags, even if we do not have the thing it points at. :no-tags Never fetch tags, even if we have the thing it points at. (default: nil)

Example usage:

(gitp/with-identity {:name "~/.ssh/id_rsa" :exclusive true} (gitp/git-pull repo :remote "my-remote"))

Fetch from and integrate with another repository or a local branch.

Options:
  :ff-mode          Keyword that corresponds to the --ff/--no-ff/--ff-only options. If nil use the value of pull.ff
                    configured in git config. If pull.ff is not configured fall back to the value of merge.ff. If
                    merge.ff is not configured --ff is the built-in default.
                      :ff
                      :ff-only
                      :no-ff
                    (default: nil)
  :monitor          Set a progress monitor. See JGit ProgressMonitor interface. (default: nil)
  :rebase-mode      Keyword that sets the rebase mode to use after fetching:
                      :rebase       Equivalent to --rebase: use rebase instead of merge after fetching.
                      :preserve     Equivalent to --preserve-merges: rebase preserving local merge commits.
                      :interactive  Equivalent to --interactive: use interactive rebase.
                      :none         Equivalent to --no-rebase: merge instead of rebasing.
                    When nil use the setting defined in the git configuration, either branch.[name].rebase or,
                    if not set, pull.rebase. This setting overrides the settings in the configuration file.
                    (default: nil)
  :recurse-subs     Corresponds to the --recurse-submodules/--no-recurse-submodules options. If nil use the value
                    of the submodule.name.fetchRecurseSubmodules option configured per submodule. If not specified
                    there, use the value of the fetch.recurseSubmodules option configured in git config. If not
                    configured in either, :on-demand is the built-in default.
                      :no
                      :on-demand
                      :yes
                    (default: nil)
  :remote           The remote (uri or name) to be used for the pull operation. If no remote is set, the branch's
                    configuration will be used. If the branch configuration is missing "origin" is used.
                    (default: nil)
  :remote-branch    The remote branch name to be used for the pull operation. If nil, the branch's configuration
                    will be used. If the branch configuration is missing the remote branch with the same name as the
                    current branch is used. (default: nil)
  :strategy         Keyword that sets the merge strategy to use during this pull operation:
                      :ours             Simple strategy that sets the output tree to the first input tree.
                      :recursive        Recursive strategy to merge paths.
                      :resolve          Simple strategy to merge paths.
                      :simple-two-way   Simple strategy to merge paths, without simultaneous edits.
                      :theirs           Simple strategy that sets the output tree to the second input tree.
                    (default: :recursive)
  :tag-opt          Keyword that sets the specification of annotated tag behavior during fetch:
                      :auto-follow    Automatically follow tags if we fetch the thing they point at.
                      :fetch-tags     Always fetch tags, even if we do not have the thing it points at.
                      :no-tags        Never fetch tags, even if we have the thing it points at.
                    (default: nil)

Example usage:

(gitp/with-identity {:name "~/.ssh/id_rsa" :exclusive true}
  (gitp/git-pull repo :remote "my-remote"))
raw docstring

git-pushclj

(git-push repo
          &
          {:keys [all? atomic? dry-run? force? monitor options output-stream
                  receive-pack ref-lease-specs ref-specs refs remote tags?
                  thin?]
           :or {options nil
                tags? false
                remote nil
                ref-specs nil
                output-stream nil
                all? false
                receive-pack nil
                atomic? false
                refs nil
                thin? false
                ref-lease-specs nil
                dry-run? false
                force? false
                monitor nil}})

Update remote refs along with associated objects.

Options: :all? Push all branches under refs/heads/*, equal to :refs "refs/heads/:refs/heads/". (default: false) :atomic? Requests atomic push (all references updated, or no updates). (default: false) :dry-run? Whether to run the push operation as a dry run. (default: false) :force? Corresponds to --force option. (default: false) :monitor Set a progress monitor. See JGit ProgressMonitor interface. (default: nil) :options String or coll of strings that corresponds to --push-option=<option>. Transmits the given string to the server, which passes them to the pre-receive as well as the post-receive hook. The given string must not contain a NUL or LF character. When multiple --push-option=<option> are given, they are all sent to the other side in the order listed. When no --push-option=<option> is given the values of configuration variable push.pushOption are used instead. (default: nil) :output-stream Sets the OutputStream to write sideband messages to. (default: nil) :receive-pack The remote executable providing receive-pack service for pack transports. If no :receive-pack is set, the default value of RemoteConfig.DEFAULT_RECEIVE_PACK will be used. (default: nil) :ref-lease-specs Map or coll of maps with format {:ref "some-ref" :expected "committish"}. Corresponds to the --force-with-lease option. :ref is the remote ref to protect, :expected is the local commit the remote branch is expected to be at, if it doesn't match the push will fail. (default: nil) :ref-specs Equal to :refs but takes a either a single RefSpec instance or a coll of those. (default: nil) :refs String or coll of strings of name(s) or ref(s) to push. If nil the repo config for the specified :remote is used, if that is also nil the ref is resolved from current HEAD. (default: nil) :remote The remote (uri or name) used for the push operation. If nil "origin" is used. (default: nil). :tags? Also push all tags under refs/tags/*. (default: false) :thin? Set the thin-pack preference for the push operation. (default: false)

Example usage:

Push current branch to remote my-remote, including tags and using the current user's ssh key for auth:

(gitp/with-identity {:name "~/.ssh/id_rsa" :exclusive true}
  (gitp/git-push repo :remote "my-remote" :tags? true))
Update remote refs along with associated objects.

Options:
  :all?             Push all branches under `refs/heads/*`, equal to :refs "refs/heads/*:refs/heads/*".
                    (default: false)
  :atomic?          Requests atomic push (all references updated, or no updates). (default: false)
  :dry-run?         Whether to run the push operation as a dry run. (default: false)
  :force?           Corresponds to --force option. (default: false)
  :monitor          Set a progress monitor. See JGit ProgressMonitor interface. (default: nil)
  :options          String or coll of strings that corresponds to --push-option=<option>. Transmits the given string
                    to the server, which passes them to the pre-receive as well as the post-receive hook. The given
                    string must not contain a NUL or LF character. When multiple --push-option=<option> are given,
                    they are all sent to the other side in the order listed. When no --push-option=<option> is given
                    the values of configuration variable push.pushOption are used instead. (default: nil)
  :output-stream    Sets the OutputStream to write sideband messages to. (default: nil)
  :receive-pack     The remote executable providing receive-pack service for pack transports. If no :receive-pack is
                    set, the default value of RemoteConfig.DEFAULT_RECEIVE_PACK will be used. (default: nil)
  :ref-lease-specs  Map or coll of maps with format {:ref "some-ref" :expected "committish"}. Corresponds to
                    the --force-with-lease option. :ref is the remote ref to protect, :expected is the local commit
                    the remote branch is expected to be at, if it doesn't match the push will fail. (default: nil)
  :ref-specs        Equal to :refs but takes a either a single RefSpec instance or a coll of those.
                    (default: nil)
  :refs             String or coll of strings of name(s) or ref(s) to push. If nil the repo config for the
                    specified :remote is used, if that is also nil the ref is resolved from current HEAD.
                    (default: nil)
  :remote           The remote (uri or name) used for the push operation. If nil "origin" is used. (default: nil).
  :tags?            Also push all tags under `refs/tags/*`. (default: false)
  :thin?            Set the thin-pack preference for the push operation. (default: false)

Example usage:

  Push current branch to remote `my-remote`, including tags and using the current user's ssh key for auth:

    (gitp/with-identity {:name "~/.ssh/id_rsa" :exclusive true}
      (gitp/git-push repo :remote "my-remote" :tags? true))
raw docstring

git-rebaseclj

(git-rebase)

git-remote-addclj

(git-remote-add repo name uri)

Add a new remote to given repo and return the JGit RemoteAddCommand instance.

Add a new remote to given repo and return the JGit RemoteAddCommand instance.
raw docstring

git-remote-listclj

(git-remote-list repo)

Returns a seq of vectors with format [name [^URIish ..]] representing all configured remotes for given repo.

Returns a seq of vectors with format [name [^URIish ..]] representing all configured remotes for given repo.
raw docstring

git-remote-removeclj

(git-remote-remove repo name)

Remove a remote with given name from repo and return the JGit RemoteRemoveCommand instance.

Remove a remote with given name from repo and return the JGit RemoteRemoveCommand instance.
raw docstring

git-resetclj

(git-reset repo
           &
           {:keys [mode monitor paths ref ref-log?]
            :or {mode :mixed monitor nil paths nil ref nil ref-log? true}})

Reset current HEAD to the specified :ref, or reset given :paths.

Options: :mode Keyword that sets the reset mode: :hard :keep :merge :mixed :soft (default: :mixed) :monitor Set a progress monitor. See JGit ProgressMonitor interface. (default: nil) :paths String or coll of strings with repository relative path(s) of file(s) or directory to reset. (default: nil) :ref String with the ref to reset to, defaults to HEAD if nil. (default: nil) :ref-log? If false disables writing a reflog entry for this reset command. (default: true)

Reset current HEAD to the specified :ref, or reset given :paths.

Options:
  :mode         Keyword that sets the reset mode:
                  :hard
                  :keep
                  :merge
                  :mixed
                  :soft
                (default: :mixed)
  :monitor      Set a progress monitor. See JGit ProgressMonitor interface. (default: nil)
  :paths        String or coll of strings with repository relative path(s) of file(s) or directory to reset.
                (default: nil)
  :ref          String with the ref to reset to, defaults to HEAD if nil. (default: nil)
  :ref-log?     If false disables writing a reflog entry for this reset command. (default: true)
raw docstring

git-revertclj

(git-revert repo
            commits
            &
            {:keys [monitor our-commit-name strategy]
             :or {monitor nil our-commit-name nil strategy :recursive}})

Revert given commits, which can either be a single resolvable ("HEAD", "a6efda", etc) or a coll of resolvables. Returns a map of format {:reverted The list of successfully reverted Ref's. Never nil but maybe an empty list if no commit was successfully cherry-picked. :unmerged Any unmerged paths, will be nil if no merge conflicts. :error The result of a merge failure, nil if no merge failure occurred during the revert.

Options: :monitor Set a progress monitor. See JGit ProgressMonitor interface. (default: nil) :our-commit-name The name to be used in the "OURS" place for conflict markers. (default: nil) :strategy Keyword that sets the merge strategy to use during this revert operation: :ours Simple strategy that sets the output tree to the first input tree. :recursive Recursive strategy to merge paths. :resolve Simple strategy to merge paths. :simple-two-way Simple strategy to merge paths, without simultaneous edits. :theirs Simple strategy that sets the output tree to the second input tree. (default: :recursive)

Revert given commits, which can either be a single resolvable ("HEAD", "a6efda", etc) or a coll of resolvables.
Returns a map of format {:reverted  The list of successfully reverted Ref's. Never nil but maybe an empty list if
                                    no commit was successfully cherry-picked.
                         :unmerged  Any unmerged paths, will be nil if no merge conflicts.
                         :error     The result of a merge failure, nil if no merge failure occurred during the revert.

Options:
  :monitor          Set a progress monitor. See JGit ProgressMonitor interface. (default: nil)
  :our-commit-name  The name to be used in the "OURS" place for conflict markers. (default: nil)
  :strategy         Keyword that sets the merge strategy to use during this revert operation:
                         :ours             Simple strategy that sets the output tree to the first input tree.
                         :recursive        Recursive strategy to merge paths.
                         :resolve          Simple strategy to merge paths.
                         :simple-two-way   Simple strategy to merge paths, without simultaneous edits.
                         :theirs           Simple strategy that sets the output tree to the second input tree.
                    (default: :recursive)
raw docstring

git-rmclj

(git-rm repo file-patterns & {:keys [cached?] :or {cached? false}})

Remove files from the working tree and from the index. file-patterns is a string or coll of strings with the repository-relative path of file(s) to remove.

Options: :cached? true if files should only be removed from index, false if files should also be deleted from the working directory. (default: false)

Remove files from the working tree and from the index. `file-patterns` is a string or coll of strings with the
repository-relative path of file(s) to remove.

Options:
  :cached?    true if files should only be removed from index, false if files should also be deleted from the
              working directory. (default: false)
raw docstring

git-stash-applyclj

(git-stash-apply repo
                 &
                 {:keys [ignore-repo-state? index? untracked? stash-ref
                         strategy]
                  :or {ignore-repo-state? false
                       index? true
                       stash-ref nil
                       strategy :recursive
                       untracked? true}})

Behaves like git stash apply --index, i.e. it tries to recover the stashed index state in addition to the working tree state.

Options: :ignore-repo-state? If true ignores the repository state when applying the stash. (default: false) :index? Whether to restore the index state. (default: true) :stash-ref String with the stash reference to apply. If nil defaults to the latest stashed commit ("stash@{0}"). (default: nil) :strategy Keyword that sets the merge strategy to use during this update operation: :ours Simple strategy that sets the output tree to the first input tree. :recursive Recursive strategy to merge paths. :resolve Simple strategy to merge paths. :simple-two-way Simple strategy to merge paths, without simultaneous edits. :theirs Simple strategy that sets the output tree to the second input tree. (default: :recursive) :untracked? Restore untracked files? (default: true)

Behaves like git stash apply --index, i.e. it tries to recover the stashed index state in addition to the working
tree state.

Options:
  :ignore-repo-state?   If true ignores the repository state when applying the stash. (default: false)
  :index?               Whether to restore the index state. (default: true)
  :stash-ref            String with the stash reference to apply. If nil defaults to the latest stashed
                        commit ("stash@{0}"). (default: nil)
  :strategy             Keyword that sets the merge strategy to use during this update operation:
                          :ours             Simple strategy that sets the output tree to the first input tree.
                          :recursive        Recursive strategy to merge paths.
                          :resolve          Simple strategy to merge paths.
                          :simple-two-way   Simple strategy to merge paths, without simultaneous edits.
                          :theirs           Simple strategy that sets the output tree to the second input tree.
                        (default: :recursive)
  :untracked?           Restore untracked files? (default: true)
raw docstring

git-stash-createclj

(git-stash-create
  repo
  &
  {:keys [index-msg person ref untracked? working-dir-msg]
   :or {index-msg nil person nil ref nil untracked? false working-dir-msg nil}})

Stash changes in the working directory and index in a commit.

Options: :index-msg Set the message used when committing index changes. The message will be formatted with the current branch, abbreviated commit id, and short commit message when used. (default: nil) :person Map of format {:name "me" :email "me@foo.net"}. Sets the person to use as the author and committer in the commits made. If nil the repo configuration is used. (default: nil) :ref Set the reference to update with the stashed commit id. If nil, no reference is updated. (default: nil) :untracked? Whether to include untracked files in the stash. (default: false) :working-dir-msg Set the message used when committing working directory changes. The message will be formatted with the current branch, abbreviated commit id, and short commit message when used. (default: nil)

Stash changes in the working directory and index in a commit.

Options:
  :index-msg        Set the message used when committing index changes. The message will be formatted with the
                    current branch, abbreviated commit id, and short commit message when used. (default: nil)
  :person           Map of format {:name "me" :email "me@foo.net"}. Sets the person to use as the author and
                    committer in the commits made. If nil the `repo` configuration is used. (default: nil)
  :ref              Set the reference to update with the stashed commit id. If nil, no reference is updated.
                    (default: nil)
  :untracked?       Whether to include untracked files in the stash. (default: false)
  :working-dir-msg  Set the message used when committing working directory changes. The message will be formatted
                    with the current branch, abbreviated commit id, and short commit message when used.
                    (default: nil)
raw docstring

git-stash-dropclj

(git-stash-drop repo & {:keys [all? stash-id] :or {all? false stash-id nil}})

Delete a stashed commit reference. Currently only supported on a traditional file repository using one-file-per-ref reflogs.

Options: :all? If true drop all stashed commits, if false only the :stash-id is dropped. (default: false) :stash-id Integer with the stash id to drop. If nil the latest stash commit (stash@{0}) is dropped. (default: nil)

Delete a stashed commit reference. Currently only supported on a traditional file repository using one-file-per-ref
reflogs.

Options:
  :all?       If true drop all stashed commits, if false only the :stash-id is dropped. (default: false)
  :stash-id   Integer with the stash id to drop. If nil the latest stash commit (stash@{0}) is dropped.
                (default: nil)
raw docstring

git-stash-listclj

(git-stash-list repo)

List the stashed commits for given repo.

List the stashed commits for given `repo`.
raw docstring

git-stash-popclj

(git-stash-pop repo)

Apply and then drop the latest stash commit.

Apply and then drop the latest stash commit.
raw docstring

git-statusclj

(git-status repo
            &
            {:keys [ignore-subs? jgit? monitor paths status status-fns
                    working-tree-iterator]
             :or {ignore-subs? nil
                  jgit? false
                  monitor nil
                  paths nil
                  status :all
                  status-fns nil
                  working-tree-iterator nil}})

Show the working tree status. Returns a map with keys corresponding to the passed :status and :status-fn args.

Options: :ignore-subs? Whether to ignore submodules. If nil use repo config. (default: nil) :jgit? If true just returns the JGit Status object. (default: false) :monitor Set a progress monitor. See JGit ProgressMonitor interface. (default: nil) :paths String or coll of strings with path(s). Only show the status of files which match the given paths. The path must either name a file or a directory exactly. All paths are always relative to the repository root. If a directory is specified all files recursively underneath that directory are matched. If multiple paths are passed the status of those files is reported which match at least one of the given paths. Note that regex expressions or wildcards are not supported. (default: nil) :status Keyword or coll of keywords that select which built-in status functions are included in the output, if nil only functions passed through :status-fns are used. Possible keywords: :added :changed :missing :modified :removed :untracked (default: :all) :status-fns Map of format {:output-id fn}. Utilize custom functions that are passed the JGit Status instance, the function's return is included in the output map at the corresponding :output-id key. Example that adds a :clean? and :changes? bool to the output map: {:clean? #(.isClean ^Status %) :changes? #(.hasUncommittedChanges ^Status %)} (default: nil) :working-tree-iterator Set the WorkingTreeIterator to be used. If nil a standard FileTreeIterator is used. (default: nil)

Show the working tree status. Returns a map with keys corresponding to the passed :status and :status-fn args.

Options:
  :ignore-subs?           Whether to ignore submodules. If nil use repo config. (default: nil)
  :jgit?                  If true just returns the JGit Status object. (default: false)
  :monitor                Set a progress monitor. See JGit ProgressMonitor interface. (default: nil)
  :paths                  String or coll of strings with path(s). Only show the status of files which match the
                          given paths. The path must either name a file or a directory exactly. All paths are
                          always relative to the repository root. If a directory is specified all files recursively
                          underneath that directory are matched. If multiple paths are passed the status of those
                          files is reported which match at least one of the given paths. Note that regex expressions
                          or wildcards are not supported. (default: nil)
  :status                 Keyword or coll of keywords that select which built-in status functions are included in
                          the output, if nil only functions passed through :status-fns are used. Possible keywords:
                            :added
                            :changed
                            :missing
                            :modified
                            :removed
                            :untracked
                          (default: :all)
  :status-fns             Map of format {:output-id fn}. Utilize custom functions that are passed the JGit Status
                          instance, the function's return is included in the output map at the corresponding
                          `:output-id` key.
                          Example that adds a :clean? and :changes? bool to the output map:
                            {:clean? #(.isClean ^Status %) :changes? #(.hasUncommittedChanges ^Status %)}
                          (default: nil)
  :working-tree-iterator  Set the WorkingTreeIterator to be used. If nil a standard FileTreeIterator is used.
                          (default: nil)
raw docstring

git-submodule-addclj

(git-submodule-add repo
                   uri
                   path
                   &
                   {:keys [name monitor] :or {name nil monitor nil}})

Clone the submodule from given uri to given path, register it in the .gitmodules file and the repository config file, and also add the submodule and .gitmodules file to the index.

Options: :name Set the submodule name, if omitted the name is derived from given path. (default: nil) :monitor Set a progress monitor. See JGit ProgressMonitor interface. (default: nil)

Clone the submodule from given `uri` to given `path`, register it in the .gitmodules file and the repository config
file, and also add the submodule and .gitmodules file to the index.

Options:
  :name     Set the submodule name, if omitted the name is derived from given path. (default: nil)
  :monitor  Set a progress monitor. See JGit ProgressMonitor interface. (default: nil)
raw docstring

git-submodule-fetchclj

(git-submodule-fetch repo)

git-submodule-initclj

(git-submodule-init repo & {:keys [paths] :or {paths nil}})

Copy the url and update fields from the working tree's .gitmodules file to given repo config file for each submodule not currently present in the repository's config file.

Options: :paths String or coll of strings with repository-relative submodule path(s) to initialize. If nil all submodules of given repo are used. (default: nil)

Copy the `url` and `update` fields from the working tree's .gitmodules file to given `repo` config file for each
submodule not currently present in the repository's config file.

Options:
  :paths     String or coll of strings with repository-relative submodule path(s) to initialize. If nil all
             submodules of given `repo` are used. (default: nil)
raw docstring

git-submodule-syncclj

(git-submodule-sync repo & {:keys [paths] :or {paths nil}})

Set the remote URL in a submodule's repository to the current value in the .gitmodules file of given repo.

Options: :paths String or coll of strings with repository-relative submodule path(s) to update. If nil all submodules of given repo are updated. (default: nil)

Set the remote URL in a submodule's repository to the current value in the .gitmodules file of given `repo`.

Options:
  :paths    String or coll of strings with repository-relative submodule path(s) to update. If nil all submodules
            of given `repo` are updated. (default: nil)
raw docstring

git-submodule-updateclj

(git-submodule-update repo
                      &
                      {:keys [callback fetch? fetch-callback monitor paths
                              strategy]
                       :or {callback nil
                            fetch? true
                            fetch-callback nil
                            monitor nil
                            paths nil
                            strategy nil}})

Update all submodules of given repo.

Options: callback Set a CloneCommand.Callback for this submodule clone operation. (default: nil) fetch? Whether to fetch the submodules before we update them. (default: true) fetch-callback Set a FetchCommand.Callback for submodule fetch operation. (default: nil) monitor Set a progress monitor. See JGit ProgressMonitor interface. (default: nil) paths String or coll of strings with repository-relative submodule path(s) to update. If nil all submodules of given repo are updated. (default: nil) strategy Keyword that sets the merge strategy to use during this update operation: :ours Simple strategy that sets the output tree to the first input tree. :recursive Recursive strategy to merge paths. :resolve Simple strategy to merge paths. :simple-two-way Simple strategy to merge paths, without simultaneous edits. :theirs Simple strategy that sets the output tree to the second input tree. (default: :recursive)

Update all submodules of given `repo`.

Options:
  callback        Set a CloneCommand.Callback for this submodule clone operation. (default: nil)
  fetch?          Whether to fetch the submodules before we update them. (default: true)
  fetch-callback  Set a FetchCommand.Callback for submodule fetch operation. (default: nil)
  monitor         Set a progress monitor. See JGit ProgressMonitor interface. (default: nil)
  paths           String or coll of strings with repository-relative submodule path(s) to update. If nil all
                  submodules of given `repo` are updated. (default: nil)
  strategy        Keyword that sets the merge strategy to use during this update operation:
                    :ours             Simple strategy that sets the output tree to the first input tree.
                    :recursive        Recursive strategy to merge paths.
                    :resolve          Simple strategy to merge paths.
                    :simple-two-way   Simple strategy to merge paths, without simultaneous edits.
                    :theirs           Simple strategy that sets the output tree to the second input tree.
                  (default: :recursive)
raw docstring

git-tag-createclj

(git-tag-create
  repo
  tag-name
  &
  {:keys [annotated? force? message signed? tagger]
   :or {annotated? true force? false message nil signed? false tagger nil}})

Creates an annotated tag with the provided name and (optional) message.

Options: :annotated? Whether this shall be an annotated tag. Note that :message and :tagger are ignored when this is set to false. (default: true) :force? If set to true the Tag command may replace an existing tag object. This corresponds to the parameter -f on the command line. (default: false) :message The tag message used for the tag. (default: nil) :signed? If set to true the Tag command creates a signed tag. This corresponds to the parameter -s on the command line. (default: false) :tagger Map of format {:name "me" :email "me@foo.net"}. Sets the tagger of the tag. If nil, a PersonIdent will be created from the info in the repository. (default: nil)

Creates an annotated tag with the provided name and (optional) message.

Options:
  :annotated?   Whether this shall be an annotated tag. Note that :message and :tagger are ignored when this
                is set to false. (default: true)
  :force?       If set to true the Tag command may replace an existing tag object. This corresponds to the
                parameter -f on the command line. (default: false)
  :message      The tag message used for the tag. (default: nil)
  :signed?      If set to true the Tag command creates a signed tag. This corresponds to the parameter -s on
                the command line. (default: false)
  :tagger       Map of format {:name "me" :email "me@foo.net"}. Sets the tagger of the tag. If nil, a
                PersonIdent will be created from the info in the repository.
                (default: nil)
raw docstring

git-tag-deleteclj

(git-tag-delete repo & tag-names)

Deletes tag(s) with the provided name(s).

Deletes tag(s) with the provided name(s).
raw docstring

git-tag-listclj

(git-tag-list repo)

Lists the tags in a repo, returning them as a sec of strings.

Lists the tags in a repo, returning them as a sec of strings.
raw docstring

jsch-factoryclj


load-repoclj

(load-repo path)

Given a path (either to the parent folder or to the .git folder itself), load the Git repository

Given a path (either to the parent folder or to the `.git` folder itself), load the Git repository
raw docstring

ls-remote-cmdclj

(ls-remote-cmd repo)

merge-ff-modesclj


merge-strategiesclj


reset-modesclj


strip-refs-headclj

(strip-refs-head s)

submodule-update-cmdclj

(submodule-update-cmd repo)

submodule-walkclj

(submodule-walk repo)
(submodule-walk repo level)

transport-tag-optsclj


with-credentialscljmacro

(with-credentials login password & body)

with-identitycljmacro

(with-identity config & body)

Creates an identity to use for SSH authentication.

Creates an identity to use for SSH authentication.
raw docstring

with-repocljmacro

(with-repo path & body)

Load Git repository at path and bind it to repo, then evaluate body. Also provides a fresh rev-walk instance for repo which is closed on form exit.

Load Git repository at `path` and bind it to `repo`, then evaluate `body`.
Also provides a fresh `rev-walk` instance for `repo` which is closed on form exit.
raw docstring

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

× close