From c5d93650c94b4ab63e617df310d1df85acee0a5c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 3 Aug 2018 14:10:05 -0400 Subject: [PATCH] prevent fetch/merge/push to cache --- doc/tips/local_caching_of_annexed_files.mdwn | 12 +++++++----- ...ment_12_cbc8fbd8a98574683008ca363d3ac6b7._comment | 8 ++++++++ 2 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 doc/tips/local_caching_of_annexed_files/comment_12_cbc8fbd8a98574683008ca363d3ac6b7._comment diff --git a/doc/tips/local_caching_of_annexed_files.mdwn b/doc/tips/local_caching_of_annexed_files.mdwn index 5c0809933e..460100c0d6 100644 --- a/doc/tips/local_caching_of_annexed_files.mdwn +++ b/doc/tips/local_caching_of_annexed_files.mdwn @@ -49,6 +49,7 @@ a remote, and configure it as follows: git config remote.cache.annex-cost 10 git config remote.cache.annex-pull 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 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. The annex-pull and annex-push settings prevent `git-annex sync` from -pulling and pushing to the remote. The cache repository will remain an -empty git repository (except for the content of annexed files). This means -that the same cache can be used with multiple different git-annex -repositories, without intermingling their git data. You should also avoid -manual `git pull` and `git push` to the cache remote. +pulling and pushing to the remote, and the remote.cache.fetch setting +further prevents git commands from fetching from it or pushing to it. The +cache repository will remain an empty git repository (except for the +content of annexed files). This means that the same cache can be used with +multiple different git-annex repositories, without intermingling their git +data. ## populating the cache diff --git a/doc/tips/local_caching_of_annexed_files/comment_12_cbc8fbd8a98574683008ca363d3ac6b7._comment b/doc/tips/local_caching_of_annexed_files/comment_12_cbc8fbd8a98574683008ca363d3ac6b7._comment new file mode 100644 index 0000000000..c259bafe93 --- /dev/null +++ b/doc/tips/local_caching_of_annexed_files/comment_12_cbc8fbd8a98574683008ca363d3ac6b7._comment @@ -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. +"""]]