{"action":"created","comment":{"url":"https://api.github.com/repos/github/git-lfs/pulls/comments/73694819","id":73694819,"diff_hunk":"@@ -0,0 +1,28 @@\n+package config\n+\n+import \"strconv\"\n+\n+// mapFetcher provides an implementation of the Fetcher interface by wrapping\n+// the `map[string]string` type.\n+type mapFetcher map[string]string","path":"config/map_fetcher.go","position":7,"original_position":7,"commit_id":"136c4cf3e5313026e24f3511ca801d41952116af","original_commit_id":"136c4cf3e5313026e24f3511ca801d41952116af","user":{"login":"sinbad","id":142735,"avatar_url":"https://avatars.githubusercontent.com/u/142735?v=3","gravatar_id":"","url":"https://api.github.com/users/sinbad","html_url":"https://github.com/sinbad","followers_url":"https://api.github.com/users/sinbad/followers","following_url":"https://api.github.com/users/sinbad/following{/other_user}","gists_url":"https://api.github.com/users/sinbad/gists{/gist_id}","starred_url":"https://api.github.com/users/sinbad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinbad/subscriptions","organizations_url":"https://api.github.com/users/sinbad/orgs","repos_url":"https://api.github.com/users/sinbad/repos","events_url":"https://api.github.com/users/sinbad/events{/privacy}","received_events_url":"https://api.github.com/users/sinbad/received_events","type":"User","site_admin":false},"body":"Seeing how it's actually used as a drop-in test replacement for other types which are safe in concurrent use I think it needs its own mutex.","created_at":"2016-08-05T13:50:31Z","updated_at":"2016-08-05T13:50:31Z","html_url":"https://github.com/github/git-lfs/pull/1415#discussion_r73694819","pull_request_url":"https://api.github.com/repos/github/git-lfs/pulls/1415","_links":{"self":{"href":"https://api.github.com/repos/github/git-lfs/pulls/comments/73694819"},"html":{"href":"https://github.com/github/git-lfs/pull/1415#discussion_r73694819"},"pull_request":{"href":"https://api.github.com/repos/github/git-lfs/pulls/1415"}}},"pull_request":{"url":"https://api.github.com/repos/github/git-lfs/pulls/1415","id":79988759,"html_url":"https://github.com/github/git-lfs/pull/1415","diff_url":"https://github.com/github/git-lfs/pull/1415.diff","patch_url":"https://github.com/github/git-lfs/pull/1415.patch","issue_url":"https://api.github.com/repos/github/git-lfs/issues/1415","number":1415,"state":"closed","locked":false,"title":"config-next: introduce Fetcher, EnvFetcher, config integration","user":{"login":"ttaylorr","id":443245,"avatar_url":"https://avatars.githubusercontent.com/u/443245?v=3","gravatar_id":"","url":"https://api.github.com/users/ttaylorr","html_url":"https://github.com/ttaylorr","followers_url":"https://api.github.com/users/ttaylorr/followers","following_url":"https://api.github.com/users/ttaylorr/following{/other_user}","gists_url":"https://api.github.com/users/ttaylorr/gists{/gist_id}","starred_url":"https://api.github.com/users/ttaylorr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ttaylorr/subscriptions","organizations_url":"https://api.github.com/users/ttaylorr/orgs","repos_url":"https://api.github.com/users/ttaylorr/repos","events_url":"https://api.github.com/users/ttaylorr/events{/privacy}","received_events_url":"https://api.github.com/users/ttaylorr/received_events","type":"User","site_admin":false},"body":"This pull request introduces types `Fetcher`, `*EnvFetcher` and integrates them into the `config.Config` type.\r\n\r\nIn doing so, we are phasing out behavior like:\r\n\r\n```go\r\nvar cfg *config.Config\r\n\r\ncfg.GetenvBool(\"foo\", true)\r\n```\r\n\r\nand replacing it with\r\n\r\n```go\r\nvar cfg *config.Config\r\n\r\ncfg.Env.Bool(\"foo\", true)\r\n```\r\n\r\nThis is the first in a series of many pull requests which will be focused on making the `*config.Config` type oriented towards data-fetching, and less domain-specific. Eventually, all of the domain-specific knowledge will disappear from the `config` package. In order to get there, however, we must first introduce a set of well factored types that will make this sort of data-fetching easy. I have described those types in https://github.com/github/git-lfs/commit/e32fabe37fc150b21a5d2d7594a5300c1388c5cb.\r\n\r\nTimeline-wise, I am thinking:\r\n\r\n1. Introduce `Fetcher`, implement `EnvFetcher`, and integrate with `*config.Config`.\r\n2. Update tests to not use mutable behavior like `Set` and `SetAll`.\r\n3. Implement the `GitFetcher`.\r\n4. Refactor `Fetcher` type as described in https://github.com/github/git-lfs/commit/e32fabe37fc150b21a5d2d7594a5300c1388c5cb.\r\n5. Piece by piece, remove legacy calls to `GetenvBool`, replacing them with `.Env.Bool` (and etc).\r\n6. Piece by piece, remove domain knowledge from the `*config.Config` type, in favor of the methodology described in https://github.com/github/git-lfs/pull/1390#issuecomment-236068550.\r\n\r\nFor a more in-depth description, please read the commit bodies of e32fabe37fc150b21a5d2d7594a5300c1388c5cb, b2272a8c165877dc31bf2eaf8f7b9c06cd139315, and f6e8c528abab7889c893274e97202f3fdf325fe1.\r\n\r\n-----------------\r\n\r\n/cc @technoweenie @rubyist @sinbad @larsxschneider ","created_at":"2016-08-03T22:15:47Z","updated_at":"2016-08-05T13:50:31Z","closed_at":"2016-08-04T16:49:14Z","merged_at":"2016-08-04T16:49:14Z","merge_commit_sha":"eea456561ee97daefcd649178901806bc0effab2","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/github/git-lfs/milestones/1","html_url":"https://github.com/github/git-lfs/milestones/config-next","labels_url":"https://api.github.com/repos/github/git-lfs/milestones/1/labels","id":1922205,"number":1,"title":"config-next","description":"","creator":{"login":"ttaylorr","id":443245,"avatar_url":"https://avatars.githubusercontent.com/u/443245?v=3","gravatar_id":"","url":"https://api.github.com/users/ttaylorr","html_url":"https://github.com/ttaylorr","followers_url":"https://api.github.com/users/ttaylorr/followers","following_url":"https://api.github.com/users/ttaylorr/following{/other_user}","gists_url":"https://api.github.com/users/ttaylorr/gists{/gist_id}","starred_url":"https://api.github.com/users/ttaylorr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ttaylorr/subscriptions","organizations_url":"https://api.github.com/users/ttaylorr/orgs","repos_url":"https://api.github.com/users/ttaylorr/repos","events_url":"https://api.github.com/users/ttaylorr/events{/privacy}","received_events_url":"https://api.github.com/users/ttaylorr/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":2,"state":"open","created_at":"2016-08-03T22:09:11Z","updated_at":"2016-08-04T20:41:15Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/github/git-lfs/pulls/1415/commits","review_comments_url":"https://api.github.com/repos/github/git-lfs/pulls/1415/comments","review_comment_url":"https://api.github.com/repos/github/git-lfs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/github/git-lfs/issues/1415/comments","statuses_url":"https://api.github.com/repos/github/git-lfs/statuses/136c4cf3e5313026e24f3511ca801d41952116af","head":{"label":"github:config-next","ref":"config-next","sha":"136c4cf3e5313026e24f3511ca801d41952116af","user":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"repo":{"id":13021798,"name":"git-lfs","full_name":"github/git-lfs","owner":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/github/git-lfs","description":"Git extension for versioning large files","fork":false,"url":"https://api.github.com/repos/github/git-lfs","forks_url":"https://api.github.com/repos/github/git-lfs/forks","keys_url":"https://api.github.com/repos/github/git-lfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/github/git-lfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/github/git-lfs/teams","hooks_url":"https://api.github.com/repos/github/git-lfs/hooks","issue_events_url":"https://api.github.com/repos/github/git-lfs/issues/events{/number}","events_url":"https://api.github.com/repos/github/git-lfs/events","assignees_url":"https://api.github.com/repos/github/git-lfs/assignees{/user}","branches_url":"https://api.github.com/repos/github/git-lfs/branches{/branch}","tags_url":"https://api.github.com/repos/github/git-lfs/tags","blobs_url":"https://api.github.com/repos/github/git-lfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/github/git-lfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/github/git-lfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/github/git-lfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/github/git-lfs/statuses/{sha}","languages_url":"https://api.github.com/repos/github/git-lfs/languages","stargazers_url":"https://api.github.com/repos/github/git-lfs/stargazers","contributors_url":"https://api.github.com/repos/github/git-lfs/contributors","subscribers_url":"https://api.github.com/repos/github/git-lfs/subscribers","subscription_url":"https://api.github.com/repos/github/git-lfs/subscription","commits_url":"https://api.github.com/repos/github/git-lfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/github/git-lfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/github/git-lfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/github/git-lfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/github/git-lfs/contents/{+path}","compare_url":"https://api.github.com/repos/github/git-lfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/github/git-lfs/merges","archive_url":"https://api.github.com/repos/github/git-lfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/github/git-lfs/downloads","issues_url":"https://api.github.com/repos/github/git-lfs/issues{/number}","pulls_url":"https://api.github.com/repos/github/git-lfs/pulls{/number}","milestones_url":"https://api.github.com/repos/github/git-lfs/milestones{/number}","notifications_url":"https://api.github.com/repos/github/git-lfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/github/git-lfs/labels{/name}","releases_url":"https://api.github.com/repos/github/git-lfs/releases{/id}","deployments_url":"https://api.github.com/repos/github/git-lfs/deployments","created_at":"2013-09-22T22:03:28Z","updated_at":"2016-08-05T13:16:11Z","pushed_at":"2016-08-05T00:58:48Z","git_url":"git://github.com/github/git-lfs.git","ssh_url":"git@github.com:github/git-lfs.git","clone_url":"https://github.com/github/git-lfs.git","svn_url":"https://github.com/github/git-lfs","homepage":"https://git-lfs.github.com","size":12088,"stargazers_count":3751,"watchers_count":3751,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":524,"mirror_url":null,"open_issues_count":266,"forks":524,"open_issues":266,"watchers":3751,"default_branch":"master"}},"base":{"label":"github:master","ref":"master","sha":"9f2ffe73bd490a5a86d96a8add75fe87d5b25a83","user":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"repo":{"id":13021798,"name":"git-lfs","full_name":"github/git-lfs","owner":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/github/git-lfs","description":"Git extension for versioning large files","fork":false,"url":"https://api.github.com/repos/github/git-lfs","forks_url":"https://api.github.com/repos/github/git-lfs/forks","keys_url":"https://api.github.com/repos/github/git-lfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/github/git-lfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/github/git-lfs/teams","hooks_url":"https://api.github.com/repos/github/git-lfs/hooks","issue_events_url":"https://api.github.com/repos/github/git-lfs/issues/events{/number}","events_url":"https://api.github.com/repos/github/git-lfs/events","assignees_url":"https://api.github.com/repos/github/git-lfs/assignees{/user}","branches_url":"https://api.github.com/repos/github/git-lfs/branches{/branch}","tags_url":"https://api.github.com/repos/github/git-lfs/tags","blobs_url":"https://api.github.com/repos/github/git-lfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/github/git-lfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/github/git-lfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/github/git-lfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/github/git-lfs/statuses/{sha}","languages_url":"https://api.github.com/repos/github/git-lfs/languages","stargazers_url":"https://api.github.com/repos/github/git-lfs/stargazers","contributors_url":"https://api.github.com/repos/github/git-lfs/contributors","subscribers_url":"https://api.github.com/repos/github/git-lfs/subscribers","subscription_url":"https://api.github.com/repos/github/git-lfs/subscription","commits_url":"https://api.github.com/repos/github/git-lfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/github/git-lfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/github/git-lfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/github/git-lfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/github/git-lfs/contents/{+path}","compare_url":"https://api.github.com/repos/github/git-lfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/github/git-lfs/merges","archive_url":"https://api.github.com/repos/github/git-lfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/github/git-lfs/downloads","issues_url":"https://api.github.com/repos/github/git-lfs/issues{/number}","pulls_url":"https://api.github.com/repos/github/git-lfs/pulls{/number}","milestones_url":"https://api.github.com/repos/github/git-lfs/milestones{/number}","notifications_url":"https://api.github.com/repos/github/git-lfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/github/git-lfs/labels{/name}","releases_url":"https://api.github.com/repos/github/git-lfs/releases{/id}","deployments_url":"https://api.github.com/repos/github/git-lfs/deployments","created_at":"2013-09-22T22:03:28Z","updated_at":"2016-08-05T13:16:11Z","pushed_at":"2016-08-05T00:58:48Z","git_url":"git://github.com/github/git-lfs.git","ssh_url":"git@github.com:github/git-lfs.git","clone_url":"https://github.com/github/git-lfs.git","svn_url":"https://github.com/github/git-lfs","homepage":"https://git-lfs.github.com","size":12088,"stargazers_count":3751,"watchers_count":3751,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":524,"mirror_url":null,"open_issues_count":266,"forks":524,"open_issues":266,"watchers":3751,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/github/git-lfs/pulls/1415"},"html":{"href":"https://github.com/github/git-lfs/pull/1415"},"issue":{"href":"https://api.github.com/repos/github/git-lfs/issues/1415"},"comments":{"href":"https://api.github.com/repos/github/git-lfs/issues/1415/comments"},"review_comments":{"href":"https://api.github.com/repos/github/git-lfs/pulls/1415/comments"},"review_comment":{"href":"https://api.github.com/repos/github/git-lfs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/github/git-lfs/pulls/1415/commits"},"statuses":{"href":"https://api.github.com/repos/github/git-lfs/statuses/136c4cf3e5313026e24f3511ca801d41952116af"}}}}
{"actor":{"display_login":"sinbad"}}