e53070c1ff
* init: When annex.securehashesonly has been set with git-annex config, copy that value to the annex.securehashesonly git config. * config --set: As well as setting value in git-annex branch, set local gitconfig. This is needed especially for annex.securehashesonly, which is read only from local gitconfig and not the git-annex branch. doc/todo/sha1_collision_embedding_in_git-annex_keys.mdwn has the rationalle for doing it this way. There's no perfect solution; this seems to be the least-bad one. This commit was supported by the NSF-funded DataLad project.
85 lines
2.2 KiB
Markdown
85 lines
2.2 KiB
Markdown
# NAME
|
|
|
|
git-annex config - configuration stored in git-annex branch
|
|
|
|
# SYNOPSIS
|
|
|
|
git annex config --set name value
|
|
|
|
git annex config --get name
|
|
|
|
git annex config --unset name
|
|
|
|
# DESCRIPTION
|
|
|
|
Set or get configuration settings stored in the git-annex branch.
|
|
|
|
Unlike `git config` settings, these settings can be seen
|
|
in all clones of the repository, once they have gotten their
|
|
git-annex branches in sync.
|
|
|
|
# SUPPORTED SETTINGS
|
|
|
|
git-annex does not check the git-annex branch for all settings.
|
|
Only a few make sense to be able to set such that all clones of a
|
|
repository see the setting, and so git-annex only looks for these:
|
|
|
|
These settings can be overridden on a per-repository basis using
|
|
`git config`.
|
|
|
|
* `annex.autocommit`
|
|
|
|
Set to false to prevent the git-annex assistant and git-annex sync
|
|
from automatically committing changes to files in the repository.
|
|
|
|
* `annex.synccontent`
|
|
|
|
Set to true to make git-annex sync default to syncing content.
|
|
|
|
* `annex.securehashesonly`
|
|
|
|
Set to true to indicate that the repository should only use
|
|
cryptographically secure hashes
|
|
(SHA2, SHA3) and not insecure hashes (MD5, SHA1) for content.
|
|
|
|
When this is set, the contents of files using cryptographically
|
|
insecure hashes will not be allowed to be added to the repository.
|
|
|
|
Also, git-annex fsck` will complain about any files present in
|
|
the repository that use insecure hashes.
|
|
|
|
Note that this is only read from the git-annex branch by
|
|
`git annex init`, and is copied to the corresponding git config setting.
|
|
So, changes to the value in the git-annex branch won't affect a
|
|
repository once it has been initialized.
|
|
|
|
# EXAMPLE
|
|
|
|
Suppose you want to prevent git annex sync from committing changes
|
|
to files, so a manual git commit workflow is used in all clones of the
|
|
repository. Then run:
|
|
|
|
git annex config --set annex.autocommit false
|
|
|
|
If you want to override that in a partiticular clone, just use git config
|
|
in the clone:
|
|
|
|
git config annex.autocommit true
|
|
|
|
And to get back to the default behavior:
|
|
|
|
git annex config --unset annex.autocommit
|
|
|
|
# SEE ALSO
|
|
|
|
[[git-annex]](1)
|
|
|
|
git-config(1)
|
|
|
|
[[git-annex-vicfg]](1)
|
|
|
|
# AUTHOR
|
|
|
|
Joey Hess <id@joeyh.name>
|
|
|
|
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
|