Skip to content

Obsolete the config paths in RepositoryOptions #1274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 17, 2016

Conversation

carlosmn
Copy link
Member

@carlosmn carlosmn commented Mar 8, 2016

The usage in our test suite seems rather gratuitous, and most of the config would have been more at home in the local configuration.

Fixes #1188

carlosmn added 5 commits March 8, 2016 09:26
We now isolate all tests by setting the config search paths globally at
the start of the fixture.
We set a dummy user name and email in the global configuration through
the options. Move away from this obsoleted method and set the
configuration at the repo level, which is where a test-specific
configuration should live.
These tests use the option to set a global configuration file with the
filemode we want. But the filemode setting should be set per-repository
as it comes down to the workdir for each repository.

Switch to setting the configuration in the local configuration, which is
also more in line with how it would exist in the wild.
@carlosmn carlosmn force-pushed the cmn/obsolete-repo-config-paths branch from 512ab1c to 4924146 Compare March 8, 2016 19:36
@carlosmn
Copy link
Member Author

carlosmn commented Mar 8, 2016

The failing test succeeds if I add code to read from Repository.Config, which triggers the discovery and adding of the config object. So there's something we're not quite doing right. I suspect it might be ProgramData doing something.

@carlosmn
Copy link
Member Author

carlosmn commented Mar 9, 2016

Looks like it was indeed the ProgramData level. For extra fun, if you access Repository.Configuration you'll actually change which configuration the repository looks at, at an arbitrary time, after an arbitrary amount of stuff has already happened. But that's a bugfix for another day.

@carlosmn carlosmn force-pushed the cmn/obsolete-repo-config-paths branch from 44b7385 to ebc43b4 Compare March 9, 2016 21:21
@carlosmn
Copy link
Member Author

carlosmn commented Mar 9, 2016

It turns out that teaching it about ProgramData in two different PRs gets awkward, so I just did it here.

ethomson pushed a commit that referenced this pull request Mar 17, 2016
Obsolete the config paths in RepositoryOptions
@ethomson ethomson merged commit 45846e2 into master Mar 17, 2016
@bording bording deleted the cmn/obsolete-repo-config-paths branch April 21, 2019 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants