View all files | ||||
An API for retrieving, caching, and programatically accessing git libraries.
To access git dependencies (for example, via tools.deps), one must download git directories and working trees as indicated by git shas. This library provides this functionality and also keeps a cache of git dirs and working trees that can be reused.
The following API is provided in clojure.tools.gitlibs:
The following git url types are supported:
The API functions all take revs, which can be any git rev that resolves to a commit, such as:
Procured working trees are always cached on the basis of the rev's full sha, so using procure repeatedly on a rev that does not resolve to a fixed sha may result in new checkouts in the cache.
Downloaded git dirs and working trees are stored in the gitlibs cache dir, ~/.gitlibs by default. This directory is just a cache and can be safely removed if needed.
tools.gitlibs can be configured by either environment variable or Java system property. If both are provided, the Java system property takes precedence.
| GITLIBS | clojure.gitlibs.dir | ~/.gitlibs | Local directory cache for git repos and working trees |
| GITLIBS_COMMAND | clojure.gitlibs.command | git | git command to run when shelling out (supply full path if needed) |
| GITLIBS_DEBUG | clojure.gitlibs.debug | false | If true, print git commands and output to stderr |
| GITLIBS_TERMINAL | clojure.gitlibs.terminal | false | If true, interactively prompt if needed |
This project follows the version scheme MAJOR.MINOR.COMMITS where MAJOR and MINOR provide some relative indication of the size of the change, but do not follow semantic versioning. In general, all changes endeavor to be non-breaking (by moving to new names rather than by breaking existing names). COMMITS is an ever-increasing counter of commits since the beginning of this repository.
Latest release: 2.6.217
Copyright © Rich Hickey, Alex Miller, and contributors
All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 1.0 which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.