This allows arbitrary git configs to be passed in. For example:
`git config --global http.postBuffer 1048576000`
`git config --global http.sslCAInfo /path/to/cert/file`
`git config --global http.sslVerify false`
This flag takes a comma-separated list of `key:val` pairs. The key part
is passed to `git config` and must be a valid gitconfig section header
and variable name. The val part can be either a quoted or unquoted
value. For all values the following escape sequences are supported:
* `\n` => [newline]
* `\t` => [tab]
* `\"` => `"`
* `\,` => `,`
* `\\` => `\`
Within unquoted values, commas MUST be escaped. Within quoted values,
commas MAY be escaped, but are not required to be. Any other escape
sequence is an error.
Example:
`--git-config=foo.one:val1,foo.two:"quoted val",foo.three:12345`
This commit exposed a bug in runCommand() which modified its args when
they had an embedded space.
Add '--period' to replace '--wait', which is now obsolete.
Add '--sync-timeout' to replace '--timeout', which is now obsolete.
Both of these new flags take a Go-style time string, rather than a bare
number. For example "1s" for 1 second or "1m" for one minute.
The old flags have been kept and will take precedence if specified.
THIS IS A BREAKING CHANGE
Switch flags implementation to use pflag. This means that long flags
like `-username` must now use 2 dashes: `--username`.
The `-v` flag (verbose) used to accept `-v` or `--v`. Now it only
accepts `-v.
The `--help` and `-h` flags are new.
The `--man` flag is new (print a man-page like help message).
Several glog flags which used to be exposed (e.g. --logtostderr) are no
longer exposed. Logs always go to stderr.
* add option to NOT recursively clone submodules
* Add "shallow" and "off" modes to submodule clone
* update readme to reflect new flag
* wording and such feedback
username/password case.
For cache to store change:
* By default, cache only last 900 seconds, gitsync will break after
that. See https://git-scm.com/docs/git-credential-cache.
* The test won't work with cache since the test don't have access to
the default unix socket location; XDG_CACHE_HOME override also can
pre-create a socket in advance.
* `store` put the credential into a file, much easier to debug than cache.
* Considering anyone have access to the pod already able to get the
credential via environment variables or yaml configs, so put it in
file won't make it less secure.
For the new password test:
1. askpass_git.sh provided to simulate a git with password challenge.
2. Need and only need to similate "clone" action, need to bypass other
actions like config/credential setup.
3. See `credential fill` is the official git action to ask password,
see https://git-scm.com/docs/git-credential.
This change resolved issue #196.