General support for ! in git-config values
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Feb 1, 2012, 17:33 UTC
- Message-ID
- <CACBZZX6U+1Fmdaz2ikbbc6zUyF=pMGQOqUGVOWCkUFBUkovCBw@mail.gmail.com>
alias.* values can start with !, in which case a shell command will be executed with the arguments you give.
For a program I'm working on (git-deploy) I'd like to have this as a general facility, i.e. users can specify either:
foo.bar = value
Or:
foo.bar = !cat /some/path
I'm wondering why git-config doesn't do this already, if there's no reason in particular I can just patch it in, either as a new option:
git config --with-exec --get foo.bar
Or as the default behavior.