improve documentation about backends

I noticed that, using just the man pages, there is no real description
of what backends are, or what ones are available. Except for some
examples.

Added a git-annex-backends man page, that is just a stub, but at least
describes what they basically are, and tells how to find the supported
ons, and links to the backends web page.

Sponsored-by: Brett Eisenberg on Patreon
This commit is contained in:
Joey Hess 2022-09-26 15:59:10 -04:00
parent f1c85ac11b
commit dcc2957d9c
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 44 additions and 14 deletions

View file

@ -1,10 +1,8 @@
When a file is annexed, a [[key|internals/key_format]] is generated from
its content and/or filesystem metadata. The file checked into git symlinks
to the key. This key can later be used to retrieve the file's content (its
value).
Multiple key-value backends are supported, and a single repository
can use different ones for different files.
The "backend" in git-annex specifies how a key is generated from a file's
content and/or filesystem metadata. Most backends are different kinds of
hashes. A single repository can use different backends for different files.
The [[key|internals/key_format]] includes the backend that is used for that
key.
## configuring which backend to use
@ -47,7 +45,8 @@ in `.gitattributes`:
platforms.
* `BLAKE2S160`, `BLAKE2S224`, `BLAKE2S256`
`BLAKE2S160E`, `BLAKE2S224E`, `BLAKE2S256E`
-- Fast [Blake2 hash](https://blake2.net/) variants optimised for 32 bit
-- Fas:w
t [Blake2 hash](https://blake2.net/) variants optimised for 32 bit
platforms.
* `BLAKE2BP512`, `BLAKE2BP512E`
-- Fast [Blake2 hash](https://blake2.net/) variants optimised for
@ -74,7 +73,7 @@ content of an annexed file remains unchanged.
URL; for long URLs, part of the URL may be represented by a checksum.
The URL key may contain `&` characters; be sure to quote the key if
passing it to a shell script. The URL-backend key is distinct from URLs/URIs
that may be attached to a key (from any backend) indicating the key's location
that may be attached to a key (using any backend) indicating the key's location
on the web or in one of [[special_remotes]].
* `GIT` -- This is used internally by git-annex when exporting trees
containing files stored in git, rather than git-annex. It represents a
@ -110,5 +109,3 @@ for [[security_reasons|security/CVE-2018-10857_and_CVE-2018-10859]].
Note that the various 512 and 384 length hashes result in long paths,
which are known to not work on Windows. If interoperability on Windows is a
concern, avoid those.
See also: [[git-annex-examinekey]]

View file

@ -0,0 +1,24 @@
# NAME
git-annex-backends - key/value backends for git-annex
# DESCRIPTION
The "backend" in git-annex controls how a key is generated from a file's
content and/or filesystem metadata. Most backends are different kinds of
hashes. A single repository can use different backends for different files.
For a list of available backends, see `git-annex version`. For more
details, see <https://git-annex.branchable.com/backends/>
# SEE ALSO
[[git-annex]](1)
# AUTHOR
Joey Hess <id@joeyh.name>
<http://git-annex.branchable.com/>
Warning: Automatically converted into a man page by mdwn2man. Edit with care.

View file

@ -57,6 +57,8 @@ it's best to run migrate in all of them.
[[git-annex-upgrade]](1)
[[git-annex-backend]](1)
# AUTHOR
Joey Hess <id@joeyh.name>

View file

@ -99,11 +99,13 @@ elsewhere to allow removing it).
Like lackingcopies, but does not look at .gitattributes annex.numcopies
settings. This makes it significantly faster.
* `inbackend=name`
* `inbackend=backendname`
Matches only files whose content is stored using the specified key-value
backend.
See [[git-annex-backends]](1) for information about available backends.
* `securehash`
Matches only files whose content is hashed using a cryptographically

View file

@ -792,7 +792,8 @@ repository, using [[git-annex-config]]. See its man page for a list.)
* `annex.backend`
Name of the default key-value backend to use when adding new files
to the repository.
to the repository. See [[git-annex-backends]](1) for information about
available backends.
This is overridden by annex annex.backend configuration in the
.gitattributes files, and by the --backend option.
@ -1908,7 +1909,9 @@ Remotes are configured using these settings in `.git/config`.
The key-value backend used when adding a new file to the annex can be
configured on a per-file-type basis via `.gitattributes` files. In the file,
the `annex.backend` attribute can be set to the name of the backend to
use. For example, this here's how to use the WORM backend by default,
use. (See [[git-annex-backends]](1) for information about
available backends.)
For example, this here's how to use the WORM backend by default,
but the SHA256E backend for ogg files:
* annex.backend=WORM

View file

@ -46,6 +46,7 @@ Extra-Source-Files:
doc/git-annex-addurl.mdwn
doc/git-annex-adjust.mdwn
doc/git-annex-assistant.mdwn
doc/git-annex-backends.mdwn
doc/git-annex-calckey.mdwn
doc/git-annex-checkpresentkey.mdwn
doc/git-annex-config.mdwn
@ -109,6 +110,7 @@ Extra-Source-Files:
doc/git-annex-renameremote.mdwn
doc/git-annex-repair.mdwn
doc/git-annex-required.mdwn
doc/git-annex-restage.mdwn
doc/git-annex-resolvemerge.mdwn
doc/git-annex-rmurl.mdwn
doc/git-annex-schedule.mdwn