64738ea157
* config: Added the --show-origin and --for-file options. * config: Support annex.numcopies and annex.mincopies. There is a little bit of redundancy here with other code elsewhere that combines the various configs and selects which to use. But really only for the special case of annex.numcopies, which is a git config that does not override the annex branch setting and for annex.mincopies, which does not have a git config but does have gitattributes settings as well as the annex branch setting. That seems small enough, and unlikely enough to grow into a mess that it was worth supporting annex.numcopies and annex.mincopies in git-annex config --show-origin. Because these settings are a prime thing that someone might get confused about and want to know where they were configured. And, it followed that git-annex config might as well support those two for --set and --get as well. While this is redundant with the speclialized commands, it's only a little code and it makes it more consistent. Note that --set does not have as nice output as numcopies/mincopies commands in some special cases like setting to 0 or a negative number. It does avoid setting to a bad value thanks to the smart constructors (eg configuredNumCopies). As for other git-annex branch configurations that are not set by git-annex config, things like trust and wanted that are specific to a repository don't map to a git config name, so don't really fit into git-annex config. And they are only configured in the git-annex branch with no local override (at least so far), so --show-origin would not be useful for them. Sponsored-by: Dartmouth College's DANDI project
45 lines
1.2 KiB
Markdown
45 lines
1.2 KiB
Markdown
# NAME
|
|
|
|
git-annex numcopies - configure desired number of copies
|
|
|
|
# SYNOPSIS
|
|
|
|
git annex numcopies `N`
|
|
|
|
# DESCRIPTION
|
|
|
|
Tells git-annex how many copies it should preserve of files, over all
|
|
repositories. The default is 1.
|
|
|
|
Run without a number to get the current value.
|
|
|
|
This configuration is stored in the git-annex branch, so it will be seen
|
|
by all clones of the repository. It can be overridden on a per-file basis
|
|
by the annex.numcopies setting in .gitattributes files, or can be
|
|
overridden temporarily with the --numcopies option.
|
|
|
|
When git-annex is asked to drop a file, it first verifies that the
|
|
number of copies can be satisfied among all the other
|
|
repositories that have a copy of the file.
|
|
|
|
In unusual situations, involving special remotes that do not support
|
|
locking, and concurrent drops of the same content from multiple
|
|
repositories, git-annex may violate the numcopies setting. It still
|
|
guarantees at least 1 copy is preserved. This can be configured by
|
|
using [[git-annex-mincopies]](1)
|
|
|
|
# OPTIONS
|
|
|
|
* The [[git-annex-common-options]](1) can be used.
|
|
|
|
# SEE ALSO
|
|
|
|
[[git-annex]](1)
|
|
[[git-annex-mincopies]](1)
|
|
[[git-annex-config]](1)
|
|
|
|
# AUTHOR
|
|
|
|
Joey Hess <id@joeyh.name>
|
|
|
|
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
|