Commit Graph

27 Commits

Author SHA1 Message Date
risk danger olson
bba8f3b876 update package imports 2016-11-15 10:01:18 -07:00
Taylor Blau
52b7f015f6 config,etc: rename EnvFetcher, config.Env to OsFetcher, config.Os 2016-08-04 14:41:04 -06:00
Taylor Blau
4b2417ed0d commands: remove usage of config.Setenv 2016-08-03 18:11:50 -06:00
Taylor Blau
8ca4fcbade config: eradicate uses of SetAllEnv
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".
2016-08-03 17:55:39 -06:00
risk danger olson
48822ade37 distinguish between empty include/exclude paths 2016-08-01 16:47:41 -06:00
risk danger olson
4f71d45acd config.NewConfig() => config.New() 2016-07-21 17:38:44 -06:00
risk danger olson
7457375b1e rename commands.Config to commands.cfg 2016-07-21 16:37:53 -06:00
Taylor Blau
ab9842c3f9 commands: use config's GetenvBool, add tests 2016-07-21 10:38:59 -06:00
Taylor Blau
02236d2e3f commands: test determineIncludeExcludePaths 2016-05-31 18:36:19 -06:00
Rick Olson
8b54aeea7f port clean, the last of the old tests 2015-05-26 16:08:03 -06:00
Rick Olson
216623196a Use goimports instead of gofmt 2015-05-13 13:43:41 -06:00
Rick Olson
c6b722db63 implement the pointer command 2015-04-22 11:41:41 -06:00
Rick Olson
e37b695477 rename hawser => git-lfs 2015-03-19 13:30:55 -06:00
rubyist
874700d960 A smattering of missed instances 2015-01-30 17:30:40 -05:00
rubyist
dda4e5baf1 Update some misc pieces 2015-01-30 12:17:19 -05:00
rubyist
c1afb37a4e Rename the command 2015-01-30 10:54:54 -05:00
rubyist
11128a86d2 Add a repo.GitCmd, tidy up ls-files test 2014-09-29 11:41:51 -04:00
rubyist
1be35b21b6 Need to append to sub-process environment, not overwrite it.
If the subprocess then launches any commands itself, it will have no
environment. e.g. PATH, GOPATH, etc are all gone.
2014-09-22 13:24:14 -04:00
Rick Olson
4416cd02fc fix version tests 2014-09-09 10:12:46 -06:00
Rick Olson
0204cb2abe almost complete the logging, lol %s 2014-08-07 08:53:13 -06:00
rubyist
2a0df64774 Don't need the dots 2014-06-13 14:46:19 -04:00
rubyist
ece4a011ad Iteration order of maps is randomized in Go, building an output string like this can sometimes fail 2014-06-11 14:24:54 -04:00
Rick Olson
c30183ae49 test that submodules don't mess up the env 2014-06-05 17:13:42 -06:00
Rick Olson
92cf6ea31a remove the old logging 2014-06-05 12:48:23 -06:00
Rick Olson
183b7fd9db test the clean command 2014-06-04 12:47:11 -06:00
Rick Olson
2f08f52ea3 remove the need to use filepath.Join for AddPath() 2014-06-04 11:44:07 -06:00
Rick Olson
4832356659 move integration tests to ./commands 2014-06-04 11:40:09 -06:00