8ca4fcbade
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". |
||
---|---|---|
.. | ||
command_checkout.go | ||
command_clean.go | ||
command_clone.go | ||
command_env.go | ||
command_ext.go | ||
command_fetch.go | ||
command_fsck.go | ||
command_init.go | ||
command_install.go | ||
command_lock.go | ||
command_locks.go | ||
command_logs.go | ||
command_ls_files.go | ||
command_pointer.go | ||
command_pre_push.go | ||
command_prune.go | ||
command_pull.go | ||
command_push.go | ||
command_smudge.go | ||
command_status.go | ||
command_track.go | ||
command_uninit.go | ||
command_uninstall.go | ||
command_unlock.go | ||
command_untrack.go | ||
command_update.go | ||
command_version.go | ||
commands_test.go | ||
commands.go | ||
uploader.go |