Added annex-cost-command configuration, which can be used to vary the cost of a remote based on the output of a shell command.

Also avoided crashing if the user specified cost value cannot be parsed.
This commit is contained in:
Joey Hess 2011-08-18 12:20:47 -04:00
parent 0c53ccc675
commit 8a2197adfa
3 changed files with 24 additions and 5 deletions

View file

@ -424,6 +424,12 @@ Here are all the supported configuration settings.
The default cost is 100 for local repositories, and 200 for remote
repositories.
* `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 eg, the current network. The
cost-command can be any shell command line.
* `remote.<name>.annex-ignore`
If set to `true`, prevents git-annex