prevent fetch/merge/push to cache
This commit is contained in:
parent
cf42e0c7b4
commit
c5d93650c9
2 changed files with 15 additions and 5 deletions
|
@ -49,6 +49,7 @@ a remote, and configure it as follows:
|
||||||
git config remote.cache.annex-cost 10
|
git config remote.cache.annex-cost 10
|
||||||
git config remote.cache.annex-pull false
|
git config remote.cache.annex-pull false
|
||||||
git config remote.cache.annex-push false
|
git config remote.cache.annex-push false
|
||||||
|
git config remote.cache.fetch do-not-fetch-from-this-remote:
|
||||||
|
|
||||||
The annex-speculate-present setting is the essential part. It makes
|
The annex-speculate-present setting is the essential part. It makes
|
||||||
git-annex know that the cache repository may contain the content of any
|
git-annex know that the cache repository may contain the content of any
|
||||||
|
@ -59,11 +60,12 @@ The low annex-cost makes git-annex try to get content from the cache remote
|
||||||
before any other remotes.
|
before any other remotes.
|
||||||
|
|
||||||
The annex-pull and annex-push settings prevent `git-annex sync` from
|
The annex-pull and annex-push settings prevent `git-annex sync` from
|
||||||
pulling and pushing to the remote. The cache repository will remain an
|
pulling and pushing to the remote, and the remote.cache.fetch setting
|
||||||
empty git repository (except for the content of annexed files). This means
|
further prevents git commands from fetching from it or pushing to it. The
|
||||||
that the same cache can be used with multiple different git-annex
|
cache repository will remain an empty git repository (except for the
|
||||||
repositories, without intermingling their git data. You should also avoid
|
content of annexed files). This means that the same cache can be used with
|
||||||
manual `git pull` and `git push` to the cache remote.
|
multiple different git-annex repositories, without intermingling their git
|
||||||
|
data.
|
||||||
|
|
||||||
## populating the cache
|
## populating the cache
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""comment 12"""
|
||||||
|
date="2018-08-03T18:09:26Z"
|
||||||
|
content="""
|
||||||
|
Found a remote.cache.fetch that will prevent most accidents, though of
|
||||||
|
course the determined footgun script may find a way.
|
||||||
|
"""]]
|
Loading…
Add table
Reference in a new issue