diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-08-17 12:26:14 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-08-17 13:54:14 -0400 |
commit | da0a1360d7b57d034620338996552752ab873045 (patch) | |
tree | 7cd5d994f15ae0d52e18321a129360b9e39a6d7d /doc | |
parent | 13ce429b5cbc3036e24613ce85e17af7acd9a480 (diff) |
add annex-ignore-command and annex-sync-command configs
Added remote configuration settings annex-ignore-command and
annex-sync-command, which are dynamic equivilants of the annex-ignore
and annex-sync configurations.
For this I needed a new DynamicConfig infrastructure. Its implementation
should be as fast as before when there is no dynamic config, and it caches
so shell commands are only run once.
Note that annex-ignore-command exits nonzero when the remote should be ignored.
While that may seem backwards, it allows using the same command for it as
for annex-sync-command when you want to disable both.
This commit was sponsored by Trenton Cronholm on Patreon.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/forum/Is_there_an___39__annex-cost__39___to_NEVER_access_remote__63__/comment_4_f1e234e80a6873b33986bec8d51c1001._comment | 7 | ||||
-rw-r--r-- | doc/git-annex.mdwn | 15 |
2 files changed, 20 insertions, 2 deletions
diff --git a/doc/forum/Is_there_an___39__annex-cost__39___to_NEVER_access_remote__63__/comment_4_f1e234e80a6873b33986bec8d51c1001._comment b/doc/forum/Is_there_an___39__annex-cost__39___to_NEVER_access_remote__63__/comment_4_f1e234e80a6873b33986bec8d51c1001._comment new file mode 100644 index 000000000..3bcce95be --- /dev/null +++ b/doc/forum/Is_there_an___39__annex-cost__39___to_NEVER_access_remote__63__/comment_4_f1e234e80a6873b33986bec8d51c1001._comment @@ -0,0 +1,7 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 4""" + date="2017-08-17T17:53:59Z" + content=""" +I've implemented annex-ignore-command and annex-sync-command. Enjoy! +"""]] diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn index c7d0f10da..14a787219 100644 --- a/doc/git-annex.mdwn +++ b/doc/git-annex.mdwn @@ -1125,8 +1125,7 @@ Here are all the supported configuration settings. * `remote.<name>.annex-cost-command` If set, the command is run, and the number it outputs is used as the cost. - This allows varying the cost based on e.g., the current network. The - cost-command can be any shell command line. + This allows varying the cost based on e.g., the current network. * `remote.<name>.annex-start-command` @@ -1165,12 +1164,24 @@ Here are all the supported configuration settings. This does not prevent git-annex sync (or the git-annex assistant) from syncing the git repository to the remote. +* `remote.<name>.annex-ignore-command` + + If set, the command is run, and if it exits nonzero, that's the same + as setting annex-ignore to true. This allows controlling behavior based + on e.g., the current network. + * `remote.<name>.annex-sync` If set to `false`, prevents git-annex sync (and the git-annex assistant) from syncing with this remote by default. However, `git annex sync <name>` can still be used to sync with the remote. +* `remote.<name>.annex-sync-command` + + If set, the command is run, and if it exits nonzero, that's the same + as setting annex-sync to false. This allows controlling behavior based + on e.g., the current network. + * `remote.<name>.annex-pull` If set to `false`, prevents git-annex sync (and the git-annex assistant |