Passing config options via shell variable to git clone

I’m trying to pass dynamically created configuration options to git clone via an environment variable on bash.

Passing them directly works, but it does not work via the env variable:

$ git clone -c 'url.foo.insteadof=bar' git://git.cweiske.de/psist.git
... all fine

$ export PARAMS="-c 'url.foo.insteadof=bar'"; git clone $PARAMS git://git.cweiske.de/psist.git
error: invalid key: 'url.foo.insteadof

What can I do to make git recognize the options?


Source: shell

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.