Add --trust, --untrust, and --semitrust options.

This commit is contained in:
Joey Hess 2011-06-01 17:49:37 -04:00
parent 7a3d9d8c2e
commit a8fb97d2ce
12 changed files with 117 additions and 58 deletions

View file

@ -5,13 +5,14 @@ Here are a few I've been considering:
---
* --numcopies would be a useful command line switch.
> Update: Added. Also allows for things like `git annex drop
> --numcopies=2` when in a repo that normally needs 3 copies, if you need
> Update: Added. Also allows for things like `git annex drop --numcopies=2` when in a repo that normally needs 3 copies, if you need
> to urgently free up space.
* A way to make `drop` and other commands temporarily trust a given remote, or possibly all remotes.
Combined, this would allow `git annex drop --numcopies=2 --trust=repoa --trust=repob` to remove files that have been replicated out to the other 2 repositories, which could be offline. (Slightly unsafe, but in this case the files are podcasts so not really.)
> Update: done --[[Joey]]
---
[[wishlist:_git-annex_replicate]] suggests some way for git-annex to have the smarts to copy content around on its own to ensure numcopies is satisfied. I'd be satisfied with a `git annex copy --to foo --if-needed-by-numcopies`

View file

@ -359,6 +359,14 @@ Many git-annex commands will stage changes for later `git commit` by you.
Overrides the `annex.numcopies` setting, forcing git-annex to ensure the
specified number of copies exist.
* --trust=repository
* --semitrust=repository
* --untrust=repository
Overrides trust settings for a repository. May be specified more than once.
The repository should be specified using the name of a configured remote.
* --backend=name
Specifies which key-value backend to use. This can be used when

View file

@ -20,7 +20,9 @@ depended on to retain a copy of the file content; possibly the only
[[copy|copies]].
(Being semitrusted is the default. The `git annex semitrust` command
restores a repository to this default, when it has been overridden.)
restores a repository to this default, when it has been overridden.
The `--semitrust` option can temporarily restore a repository to this
default.)
## untrusted
@ -42,7 +44,8 @@ archival drive, from which you rarely or never remove content. Deciding
when it makes sense to trust the tracking info is up to you.
One way to handle this is just to use `--force` when a command cannot
access a remote you trust.
access a remote you trust. Or to use `--trust` to specify a repisitory to
trust temporarily.
To configure a repository as fully trusted, use the `git annex trust`
command.
To configure a repository as fully and permanently trusted,
use the `git annex trust` command.