{"action":"created","comment":{"url":"https://api.github.com/repos/github/git-lfs/pulls/comments/38560086","id":38560086,"diff_hunk":"@@ -0,0 +1,88 @@\n+package lfs\n+\n+import (\n+\t\"fmt\"\n+\t\"regexp\"\n+\t\"strings\"\n+\n+\t\"github.com/github/git-lfs/git\"\n+)\n+\n+var (\n+\tvalueRegexp = regexp.MustCompile(\"\\\\Agit[\\\\-\\\\s]media\")\n+)\n+\n+// Attribute wraps the structure and some operations of Git's conception of an\n+// \"attribute\", as defined here: http://git-scm.com/docs/gitattributes.\n+type Attribute struct {\n+\t// The Path of an Attribute refers to the path at which all properties\n+\t// are relative to. For example, for a Path with the value \"core\", Git\n+\t// will produce something like:\n+\t//\n+\t// [core]\n+\t//\tautocrlf = true\n+\t//\t...\n+\tPath string","path":"lfs/attribute.go","position":25,"original_position":25,"commit_id":"3b9b0f2b7f9509b9bfbcc79bb2b44a9ac43d249c","original_commit_id":"3b9b0f2b7f9509b9bfbcc79bb2b44a9ac43d249c","user":{"login":"technoweenie","id":21,"avatar_url":"https://avatars.githubusercontent.com/u/21?v=3","gravatar_id":"","url":"https://api.github.com/users/technoweenie","html_url":"https://github.com/technoweenie","followers_url":"https://api.github.com/users/technoweenie/followers","following_url":"https://api.github.com/users/technoweenie/following{/other_user}","gists_url":"https://api.github.com/users/technoweenie/gists{/gist_id}","starred_url":"https://api.github.com/users/technoweenie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/technoweenie/subscriptions","organizations_url":"https://api.github.com/users/technoweenie/orgs","repos_url":"https://api.github.com/users/technoweenie/repos","events_url":"https://api.github.com/users/technoweenie/events{/privacy}","received_events_url":"https://api.github.com/users/technoweenie/received_events","type":"User","site_admin":true},"body":"`Path` makes me think of the file system. What about \"section\"?","created_at":"2015-09-02T17:28:42Z","updated_at":"2015-09-02T17:28:42Z","html_url":"https://github.com/github/git-lfs/pull/619#discussion_r38560086","pull_request_url":"https://api.github.com/repos/github/git-lfs/pulls/619","_links":{"self":{"href":"https://api.github.com/repos/github/git-lfs/pulls/comments/38560086"},"html":{"href":"https://github.com/github/git-lfs/pull/619#discussion_r38560086"},"pull_request":{"href":"https://api.github.com/repos/github/git-lfs/pulls/619"}}},"pull_request":{"url":"https://api.github.com/repos/github/git-lfs/pulls/619","id":43721450,"html_url":"https://github.com/github/git-lfs/pull/619","diff_url":"https://github.com/github/git-lfs/pull/619.diff","patch_url":"https://github.com/github/git-lfs/pull/619.patch","issue_url":"https://api.github.com/repos/github/git-lfs/issues/619","number":619,"state":"open","locked":false,"title":"lfs: promote Hooks and Attributes to types","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 commit introduces two new types into the API: Hook, and Filter.\r\n\r\nBoth `Hook` and `Filter` are abstractions built on Git hooks and filters\r\nrespectively. Each type knows how to install and uninstall itself. These\r\nprocesses are utilized by the setup method in the `lfs` package, and the\r\nappropriate calls have been updated in the init and uninit commands.\r\n\r\nThese abstractions were introduced to make adding/removing required filters and\r\nhooks easier for future projects, including the migration away from the smudge\r\nfilter.\r\n\r\nEventually it seems appropriate to move both new types into the `git` package,\r\nas opposed to the `lfs` package. At the time of writing this commit, there is\r\nsome coupling against state defined in the `lfs` package (i.e., whether or not\r\nwe're currently in a git repo, the local working directory, etc). At somepoint\r\nit would be nice to remove that coupling and move these new types into the\r\n`git` package.","created_at":"2015-08-30T22:01:57Z","updated_at":"2015-09-02T17:28:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f10f601bb9d04f9e0b6b390f2329c20731ac774","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/github/git-lfs/pulls/619/commits","review_comments_url":"https://api.github.com/repos/github/git-lfs/pulls/619/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/619/comments","statuses_url":"https://api.github.com/repos/github/git-lfs/statuses/3b9b0f2b7f9509b9bfbcc79bb2b44a9ac43d249c","head":{"label":"ttaylorr:promote-hooks","ref":"promote-hooks","sha":"3b9b0f2b7f9509b9bfbcc79bb2b44a9ac43d249c","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},"repo":{"id":41388603,"name":"git-lfs","full_name":"ttaylorr/git-lfs","owner":{"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},"private":false,"html_url":"https://github.com/ttaylorr/git-lfs","description":"Git extension for versioning large files","fork":true,"url":"https://api.github.com/repos/ttaylorr/git-lfs","forks_url":"https://api.github.com/repos/ttaylorr/git-lfs/forks","keys_url":"https://api.github.com/repos/ttaylorr/git-lfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ttaylorr/git-lfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ttaylorr/git-lfs/teams","hooks_url":"https://api.github.com/repos/ttaylorr/git-lfs/hooks","issue_events_url":"https://api.github.com/repos/ttaylorr/git-lfs/issues/events{/number}","events_url":"https://api.github.com/repos/ttaylorr/git-lfs/events","assignees_url":"https://api.github.com/repos/ttaylorr/git-lfs/assignees{/user}","branches_url":"https://api.github.com/repos/ttaylorr/git-lfs/branches{/branch}","tags_url":"https://api.github.com/repos/ttaylorr/git-lfs/tags","blobs_url":"https://api.github.com/repos/ttaylorr/git-lfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ttaylorr/git-lfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ttaylorr/git-lfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ttaylorr/git-lfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ttaylorr/git-lfs/statuses/{sha}","languages_url":"https://api.github.com/repos/ttaylorr/git-lfs/languages","stargazers_url":"https://api.github.com/repos/ttaylorr/git-lfs/stargazers","contributors_url":"https://api.github.com/repos/ttaylorr/git-lfs/contributors","subscribers_url":"https://api.github.com/repos/ttaylorr/git-lfs/subscribers","subscription_url":"https://api.github.com/repos/ttaylorr/git-lfs/subscription","commits_url":"https://api.github.com/repos/ttaylorr/git-lfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ttaylorr/git-lfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ttaylorr/git-lfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ttaylorr/git-lfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ttaylorr/git-lfs/contents/{+path}","compare_url":"https://api.github.com/repos/ttaylorr/git-lfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ttaylorr/git-lfs/merges","archive_url":"https://api.github.com/repos/ttaylorr/git-lfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ttaylorr/git-lfs/downloads","issues_url":"https://api.github.com/repos/ttaylorr/git-lfs/issues{/number}","pulls_url":"https://api.github.com/repos/ttaylorr/git-lfs/pulls{/number}","milestones_url":"https://api.github.com/repos/ttaylorr/git-lfs/milestones{/number}","notifications_url":"https://api.github.com/repos/ttaylorr/git-lfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ttaylorr/git-lfs/labels{/name}","releases_url":"https://api.github.com/repos/ttaylorr/git-lfs/releases{/id}","created_at":"2015-08-25T21:23:46Z","updated_at":"2015-08-25T21:23:46Z","pushed_at":"2015-09-01T22:20:32Z","git_url":"git://github.com/ttaylorr/git-lfs.git","ssh_url":"git@github.com:ttaylorr/git-lfs.git","clone_url":"https://github.com/ttaylorr/git-lfs.git","svn_url":"https://github.com/ttaylorr/git-lfs","homepage":"https://git-lfs.github.com","size":4098,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"github:master","ref":"master","sha":"d7aa08453315dd7f7f145d4aac263f494245533d","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}","created_at":"2013-09-22T22:03:28Z","updated_at":"2015-09-01T19:21:47Z","pushed_at":"2015-09-02T16:55:08Z","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":12733,"stargazers_count":2293,"watchers_count":2293,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":159,"mirror_url":null,"open_issues_count":117,"forks":159,"open_issues":117,"watchers":2293,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/github/git-lfs/pulls/619"},"html":{"href":"https://github.com/github/git-lfs/pull/619"},"issue":{"href":"https://api.github.com/repos/github/git-lfs/issues/619"},"comments":{"href":"https://api.github.com/repos/github/git-lfs/issues/619/comments"},"review_comments":{"href":"https://api.github.com/repos/github/git-lfs/pulls/619/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/619/commits"},"statuses":{"href":"https://api.github.com/repos/github/git-lfs/statuses/3b9b0f2b7f9509b9bfbcc79bb2b44a9ac43d249c"}}}}