{"action":"created","comment":{"url":"https://api.github.com/repos/dart-lang/path/pulls/comments/82277771","pull_request_review_id":3196017,"id":82277771,"diff_hunk":"@@ -771,6 +844,80 @@ class Context {\n     return _PathDirection.belowRoot;\n   }\n \n+  /// Returns a hash code for [path] that matches the semantics of [equals].\n+  ///\n+  /// Note that the same path may have different hash codes in different\n+  /// [Context]s.\n+  int hash(String path) {\n+    // Make [path] absolute to ensure that equivalent relative and absolute\n+    // paths have the same hash code.\n+    path = absolute(path);\n+\n+    var result = _hashFast(path);\n+    if (result != null) return result;\n+\n+    var parsed = _parse(path);\n+    parsed.normalize();\n+    return _hashFast(parsed.toString());\n+  }\n+\n+  /// An optimized implementation of [hash] that doesn't handle internal `..`\n+  /// components.\n+  ///\n+  /// This will handle `..` components that appear at the beginning of the path.\n+  int _hashFast(String path) {\n+    var hash = 4603;","path":"lib/src/context.dart","position":368,"original_position":368,"commit_id":"bc5f5f9028ba41a9354eb9fed440f32ea06d9c6d","original_commit_id":"bc5f5f9028ba41a9354eb9fed440f32ea06d9c6d","user":{"login":"munificent","id":46275,"avatar_url":"https://avatars.githubusercontent.com/u/46275?v=3","gravatar_id":"","url":"https://api.github.com/users/munificent","html_url":"https://github.com/munificent","followers_url":"https://api.github.com/users/munificent/followers","following_url":"https://api.github.com/users/munificent/following{/other_user}","gists_url":"https://api.github.com/users/munificent/gists{/gist_id}","starred_url":"https://api.github.com/users/munificent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munificent/subscriptions","organizations_url":"https://api.github.com/users/munificent/orgs","repos_url":"https://api.github.com/users/munificent/repos","events_url":"https://api.github.com/users/munificent/events{/privacy}","received_events_url":"https://api.github.com/users/munificent/received_events","type":"User","site_admin":false},"body":"Where's this number from?","created_at":"2016-10-06T20:31:53Z","updated_at":"2016-10-06T20:44:48Z","html_url":"https://github.com/dart-lang/path/pull/16#discussion_r82277771","pull_request_url":"https://api.github.com/repos/dart-lang/path/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/dart-lang/path/pulls/comments/82277771"},"html":{"href":"https://github.com/dart-lang/path/pull/16#discussion_r82277771"},"pull_request":{"href":"https://api.github.com/repos/dart-lang/path/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/dart-lang/path/pulls/16","id":88182319,"html_url":"https://github.com/dart-lang/path/pull/16","diff_url":"https://github.com/dart-lang/path/pull/16.diff","patch_url":"https://github.com/dart-lang/path/pull/16.patch","issue_url":"https://api.github.com/repos/dart-lang/path/issues/16","number":16,"state":"open","locked":false,"title":"Add new equality and canonicalization functions.","user":{"login":"nex3","id":188,"avatar_url":"https://avatars.githubusercontent.com/u/188?v=3","gravatar_id":"","url":"https://api.github.com/users/nex3","html_url":"https://github.com/nex3","followers_url":"https://api.github.com/users/nex3/followers","following_url":"https://api.github.com/users/nex3/following{/other_user}","gists_url":"https://api.github.com/users/nex3/gists{/gist_id}","starred_url":"https://api.github.com/users/nex3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nex3/subscriptions","organizations_url":"https://api.github.com/users/nex3/orgs","repos_url":"https://api.github.com/users/nex3/repos","events_url":"https://api.github.com/users/nex3/events{/privacy}","received_events_url":"https://api.github.com/users/nex3/received_events","type":"User","site_admin":false},"body":"Closes #14","created_at":"2016-10-06T00:43:11Z","updated_at":"2016-10-06T20:44:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a0fa4384ee24f98b670890d4ce749905a500036f","assignee":{"login":"munificent","id":46275,"avatar_url":"https://avatars.githubusercontent.com/u/46275?v=3","gravatar_id":"","url":"https://api.github.com/users/munificent","html_url":"https://github.com/munificent","followers_url":"https://api.github.com/users/munificent/followers","following_url":"https://api.github.com/users/munificent/following{/other_user}","gists_url":"https://api.github.com/users/munificent/gists{/gist_id}","starred_url":"https://api.github.com/users/munificent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munificent/subscriptions","organizations_url":"https://api.github.com/users/munificent/orgs","repos_url":"https://api.github.com/users/munificent/repos","events_url":"https://api.github.com/users/munificent/events{/privacy}","received_events_url":"https://api.github.com/users/munificent/received_events","type":"User","site_admin":false},"assignees":[{"login":"munificent","id":46275,"avatar_url":"https://avatars.githubusercontent.com/u/46275?v=3","gravatar_id":"","url":"https://api.github.com/users/munificent","html_url":"https://github.com/munificent","followers_url":"https://api.github.com/users/munificent/followers","following_url":"https://api.github.com/users/munificent/following{/other_user}","gists_url":"https://api.github.com/users/munificent/gists{/gist_id}","starred_url":"https://api.github.com/users/munificent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munificent/subscriptions","organizations_url":"https://api.github.com/users/munificent/orgs","repos_url":"https://api.github.com/users/munificent/repos","events_url":"https://api.github.com/users/munificent/events{/privacy}","received_events_url":"https://api.github.com/users/munificent/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dart-lang/path/pulls/16/commits","review_comments_url":"https://api.github.com/repos/dart-lang/path/pulls/16/comments","review_comment_url":"https://api.github.com/repos/dart-lang/path/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dart-lang/path/issues/16/comments","statuses_url":"https://api.github.com/repos/dart-lang/path/statuses/bc5f5f9028ba41a9354eb9fed440f32ea06d9c6d","head":{"label":"dart-lang:new-fns","ref":"new-fns","sha":"bc5f5f9028ba41a9354eb9fed440f32ea06d9c6d","user":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars.githubusercontent.com/u/1609975?v=3","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":28161325,"name":"path","full_name":"dart-lang/path","owner":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars.githubusercontent.com/u/1609975?v=3","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dart-lang/path","description":"A string-based path manipulation library.","fork":false,"url":"https://api.github.com/repos/dart-lang/path","forks_url":"https://api.github.com/repos/dart-lang/path/forks","keys_url":"https://api.github.com/repos/dart-lang/path/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dart-lang/path/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dart-lang/path/teams","hooks_url":"https://api.github.com/repos/dart-lang/path/hooks","issue_events_url":"https://api.github.com/repos/dart-lang/path/issues/events{/number}","events_url":"https://api.github.com/repos/dart-lang/path/events","assignees_url":"https://api.github.com/repos/dart-lang/path/assignees{/user}","branches_url":"https://api.github.com/repos/dart-lang/path/branches{/branch}","tags_url":"https://api.github.com/repos/dart-lang/path/tags","blobs_url":"https://api.github.com/repos/dart-lang/path/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dart-lang/path/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dart-lang/path/git/refs{/sha}","trees_url":"https://api.github.com/repos/dart-lang/path/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dart-lang/path/statuses/{sha}","languages_url":"https://api.github.com/repos/dart-lang/path/languages","stargazers_url":"https://api.github.com/repos/dart-lang/path/stargazers","contributors_url":"https://api.github.com/repos/dart-lang/path/contributors","subscribers_url":"https://api.github.com/repos/dart-lang/path/subscribers","subscription_url":"https://api.github.com/repos/dart-lang/path/subscription","commits_url":"https://api.github.com/repos/dart-lang/path/commits{/sha}","git_commits_url":"https://api.github.com/repos/dart-lang/path/git/commits{/sha}","comments_url":"https://api.github.com/repos/dart-lang/path/comments{/number}","issue_comment_url":"https://api.github.com/repos/dart-lang/path/issues/comments{/number}","contents_url":"https://api.github.com/repos/dart-lang/path/contents/{+path}","compare_url":"https://api.github.com/repos/dart-lang/path/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dart-lang/path/merges","archive_url":"https://api.github.com/repos/dart-lang/path/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dart-lang/path/downloads","issues_url":"https://api.github.com/repos/dart-lang/path/issues{/number}","pulls_url":"https://api.github.com/repos/dart-lang/path/pulls{/number}","milestones_url":"https://api.github.com/repos/dart-lang/path/milestones{/number}","notifications_url":"https://api.github.com/repos/dart-lang/path/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dart-lang/path/labels{/name}","releases_url":"https://api.github.com/repos/dart-lang/path/releases{/id}","deployments_url":"https://api.github.com/repos/dart-lang/path/deployments","created_at":"2014-12-18T00:16:02Z","updated_at":"2016-09-24T14:59:38Z","pushed_at":"2016-10-06T00:43:11Z","git_url":"git://github.com/dart-lang/path.git","ssh_url":"git@github.com:dart-lang/path.git","clone_url":"https://github.com/dart-lang/path.git","svn_url":"https://github.com/dart-lang/path","homepage":"https://pub.dartlang.org/packages/path","size":214,"stargazers_count":9,"watchers_count":9,"language":"Dart","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":9,"default_branch":"master"}},"base":{"label":"dart-lang:master","ref":"master","sha":"e343ab3e618afda2bd4b785bf8fd012f587b639a","user":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars.githubusercontent.com/u/1609975?v=3","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":28161325,"name":"path","full_name":"dart-lang/path","owner":{"login":"dart-lang","id":1609975,"avatar_url":"https://avatars.githubusercontent.com/u/1609975?v=3","gravatar_id":"","url":"https://api.github.com/users/dart-lang","html_url":"https://github.com/dart-lang","followers_url":"https://api.github.com/users/dart-lang/followers","following_url":"https://api.github.com/users/dart-lang/following{/other_user}","gists_url":"https://api.github.com/users/dart-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/dart-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dart-lang/subscriptions","organizations_url":"https://api.github.com/users/dart-lang/orgs","repos_url":"https://api.github.com/users/dart-lang/repos","events_url":"https://api.github.com/users/dart-lang/events{/privacy}","received_events_url":"https://api.github.com/users/dart-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dart-lang/path","description":"A string-based path manipulation library.","fork":false,"url":"https://api.github.com/repos/dart-lang/path","forks_url":"https://api.github.com/repos/dart-lang/path/forks","keys_url":"https://api.github.com/repos/dart-lang/path/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dart-lang/path/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dart-lang/path/teams","hooks_url":"https://api.github.com/repos/dart-lang/path/hooks","issue_events_url":"https://api.github.com/repos/dart-lang/path/issues/events{/number}","events_url":"https://api.github.com/repos/dart-lang/path/events","assignees_url":"https://api.github.com/repos/dart-lang/path/assignees{/user}","branches_url":"https://api.github.com/repos/dart-lang/path/branches{/branch}","tags_url":"https://api.github.com/repos/dart-lang/path/tags","blobs_url":"https://api.github.com/repos/dart-lang/path/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dart-lang/path/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dart-lang/path/git/refs{/sha}","trees_url":"https://api.github.com/repos/dart-lang/path/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dart-lang/path/statuses/{sha}","languages_url":"https://api.github.com/repos/dart-lang/path/languages","stargazers_url":"https://api.github.com/repos/dart-lang/path/stargazers","contributors_url":"https://api.github.com/repos/dart-lang/path/contributors","subscribers_url":"https://api.github.com/repos/dart-lang/path/subscribers","subscription_url":"https://api.github.com/repos/dart-lang/path/subscription","commits_url":"https://api.github.com/repos/dart-lang/path/commits{/sha}","git_commits_url":"https://api.github.com/repos/dart-lang/path/git/commits{/sha}","comments_url":"https://api.github.com/repos/dart-lang/path/comments{/number}","issue_comment_url":"https://api.github.com/repos/dart-lang/path/issues/comments{/number}","contents_url":"https://api.github.com/repos/dart-lang/path/contents/{+path}","compare_url":"https://api.github.com/repos/dart-lang/path/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dart-lang/path/merges","archive_url":"https://api.github.com/repos/dart-lang/path/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dart-lang/path/downloads","issues_url":"https://api.github.com/repos/dart-lang/path/issues{/number}","pulls_url":"https://api.github.com/repos/dart-lang/path/pulls{/number}","milestones_url":"https://api.github.com/repos/dart-lang/path/milestones{/number}","notifications_url":"https://api.github.com/repos/dart-lang/path/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dart-lang/path/labels{/name}","releases_url":"https://api.github.com/repos/dart-lang/path/releases{/id}","deployments_url":"https://api.github.com/repos/dart-lang/path/deployments","created_at":"2014-12-18T00:16:02Z","updated_at":"2016-09-24T14:59:38Z","pushed_at":"2016-10-06T00:43:11Z","git_url":"git://github.com/dart-lang/path.git","ssh_url":"git@github.com:dart-lang/path.git","clone_url":"https://github.com/dart-lang/path.git","svn_url":"https://github.com/dart-lang/path","homepage":"https://pub.dartlang.org/packages/path","size":214,"stargazers_count":9,"watchers_count":9,"language":"Dart","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dart-lang/path/pulls/16"},"html":{"href":"https://github.com/dart-lang/path/pull/16"},"issue":{"href":"https://api.github.com/repos/dart-lang/path/issues/16"},"comments":{"href":"https://api.github.com/repos/dart-lang/path/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/dart-lang/path/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/dart-lang/path/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dart-lang/path/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/dart-lang/path/statuses/bc5f5f9028ba41a9354eb9fed440f32ea06d9c6d"}}}}
{"actor":{"display_login":"munificent"}}