dist: tools: git-cache: update README

This commit is contained in:
Kaspar Schleiser 2017-01-11 16:07:42 +01:00
parent b0dad94ab5
commit eecf43cd53

View File

@ -5,21 +5,19 @@ This directory contains some git tools used by RIOT's build system
## git-cache
Simple git caching script, from https://github.com/kaspar030/git-cache
If git-cache is unconfigured, the script pulls from the given remote location.
If git-cache has not been initialized, it will fall back to do checkouts from
the remote repository.
Otherwise it will transparently cache repositories in it's cache folder,
ideally not touching the network if a requested commit / tag can be cloned from
the cache.
In order to set up the cache, do:
- install the git-cache binary into path.
This will make the script available as "git cache ...".
Alternatively, directly execute it.
- run "git cache init", which initializes a git cache in ${HOME}/.gitcache.
- run "git cache init" (or "dist/tools/git/git-cache init", which initializes a
git cache in ${HOME}/.gitcache.
The used path can be overridden using the "GIT_CACHE_DIR" environment
variable.
The cache repository will be used to cache multiple remote repositories.
- add a repository to the cache: "git cache add \<URL\>
- whenever needed (at least once after adding a repository),
run "git cache update"
If the GIT_CACHE_AUTOADD environment variable is set to "1", a "git cache
clone" will add the repository to the cache (and immediately update) if the url
is not yet in the cache.