Calling `Unmarshal` on a struct-pointer will inspect each of that struct's
field's tags, and unmarshal configuration data into said field according to
three parameters:
- The environment specified, either `git` or `os`.
- The name of the key given (in the tag).
- The type of the field (either `string`, `int`, or `bool`).
If there is already a non-zero value stored in the field, then that field will
be skipped, allowing constructors to set up default behavior.
The `SetAllEnv` function is one of two functions that allow for mutable
behavior within the `*config.Configuration` type. It is desirable for us to
remove that function, and all of its uses throughout the LFS codebase.
Unfortunately, a lot of `SetAllEnv` uses are coupled to initializing the
`config.Configuration` instance with custom `.gitconfig` data, a-la
`NewFromValues`. This coupling makes it difficult to write an atomic commit
that *only* removes the usage of `SetAllEnv`.
As a compromise, the signature of `NewFromValues` changed from:
```
func NewFromValues(gitconfig map[string]strimg) *Configuration
```
to...
```
type Values struct {
Git, Env map[string]string
}
func NewFrom(v Values) *Configuration
```
To support reading fixed data as a part of the `Env` fetcher, a new Fetcher
type was introduced:
```
type mapFetcher map[string]string
func (m mapFetcher) Get(key string) (val string) { ... }
```
and is used in place of the old `*EnvFetcher` to retrieve data from the
"environment".
Will be useful as a workaround where there are server bugs & avoid having
to retry across adapters without knowing whether the cause is transient
or not.