{"action":"created","comment":{"url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/pulls/comments/211295067","pull_request_review_id":147685141,"id":211295067,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTI5NTA2Nw==","diff_hunk":"@@ -0,0 +1,65 @@\n+import path from 'path'\n+\n+import { GitIndexManager } from '../managers/GitIndexManager.js'\n+import { GitObjectManager } from '../managers/GitObjectManager.js'\n+import { FileSystem } from '../models/FileSystem.js'\n+\n+import { readObject } from './readObject'\n+import { log } from './log'\n+\n+/**\n+ * Reset a file from the git index (aka staging area)\n+ *\n+ * @link https://isomorphic-git.github.io/docs/resetIndex.html\n+ */\n+export async function resetIndex ({\n+  dir,\n+  gitdir = path.join(dir, '.git'),\n+  fs: _fs,\n+  filepath,\n+  ref = 'HEAD'\n+}) {\n+  try {\n+    const fs = new FileSystem(_fs)\n+    const tree = await log({ gitdir, fs, ref, depth: 1 })","path":"src/commands/resetIndex.js","position":24,"original_position":24,"commit_id":"0642b634e66c4dddbc9a04d5e8b1fc8501c60095","original_commit_id":"0642b634e66c4dddbc9a04d5e8b1fc8501c60095","user":{"login":"wmhilton","id":587740,"node_id":"MDQ6VXNlcjU4Nzc0MA==","avatar_url":"https://avatars2.githubusercontent.com/u/587740?v=4","gravatar_id":"","url":"https://api.github.com/users/wmhilton","html_url":"https://github.com/wmhilton","followers_url":"https://api.github.com/users/wmhilton/followers","following_url":"https://api.github.com/users/wmhilton/following{/other_user}","gists_url":"https://api.github.com/users/wmhilton/gists{/gist_id}","starred_url":"https://api.github.com/users/wmhilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmhilton/subscriptions","organizations_url":"https://api.github.com/users/wmhilton/orgs","repos_url":"https://api.github.com/users/wmhilton/repos","events_url":"https://api.github.com/users/wmhilton/events{/privacy}","received_events_url":"https://api.github.com/users/wmhilton/received_events","type":"User","site_admin":false},"body":"Can you use `src/utils/resolveTree.js` here instead of `log`? `log` will only resolve commits, whereas `resolveTree` will also handle raw OIDs or tags that point directly to `tree` objects.","created_at":"2018-08-20T15:01:53Z","updated_at":"2018-08-20T15:15:30Z","html_url":"https://github.com/isomorphic-git/isomorphic-git/pull/381#discussion_r211295067","pull_request_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/pulls/381","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/isomorphic-git/isomorphic-git/pulls/comments/211295067"},"html":{"href":"https://github.com/isomorphic-git/isomorphic-git/pull/381#discussion_r211295067"},"pull_request":{"href":"https://api.github.com/repos/isomorphic-git/isomorphic-git/pulls/381"}}},"pull_request":{"url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/pulls/381","id":208583772,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4NTgzNzcy","html_url":"https://github.com/isomorphic-git/isomorphic-git/pull/381","diff_url":"https://github.com/isomorphic-git/isomorphic-git/pull/381.diff","patch_url":"https://github.com/isomorphic-git/isomorphic-git/pull/381.patch","issue_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/issues/381","number":381,"state":"open","locked":false,"title":"new improved command `reset`","user":{"login":"akaJes","id":3035266,"node_id":"MDQ6VXNlcjMwMzUyNjY=","avatar_url":"https://avatars3.githubusercontent.com/u/3035266?v=4","gravatar_id":"","url":"https://api.github.com/users/akaJes","html_url":"https://github.com/akaJes","followers_url":"https://api.github.com/users/akaJes/followers","following_url":"https://api.github.com/users/akaJes/following{/other_user}","gists_url":"https://api.github.com/users/akaJes/gists{/gist_id}","starred_url":"https://api.github.com/users/akaJes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akaJes/subscriptions","organizations_url":"https://api.github.com/users/akaJes/orgs","repos_url":"https://api.github.com/users/akaJes/repos","events_url":"https://api.github.com/users/akaJes/events{/privacy}","received_events_url":"https://api.github.com/users/akaJes/received_events","type":"User","site_admin":false},"body":"\r\n## I'm adding a new command:\r\n\r\n- [x] add as a new file in `src/commands`\r\n- [x] add command to `src/index.js`\r\n- [x] add TypeScript definition in `src/index.d.ts`\r\n- [x] create a test in `src/__tests__`\r\n- [x] update `__tests__/__snapshots__/test-exports.js.snap`\r\n- [x] add command to README list of commands\r\n- [x] create a new doc page [docs](https://github.com/isomorphic-git/isomorphic-git.github.io/tree/source/docs)/X.md\r\n  - [x] add page to the [Alphabetical Index](https://github.com/isomorphic-git/isomorphic-git.github.io/blob/source/docs/alphabetic.md)\r\n  - [x] add page to the [sidebar](https://github.com/isomorphic-git/isomorphic-git.github.io/blob/source/website/sidebars.json)\r\n- [x] if this is your first time contributing, run `npm run add-contributor` and follow the prompts to add yourself to the README\r\n- [x] make a feature commit \"feat: Added 'X' command\"\r\n\r\n","created_at":"2018-08-15T14:45:20Z","updated_at":"2018-08-20T15:15:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"87afb672e75c3a3eb46c63aace95bacf78aadb6c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/pulls/381/commits","review_comments_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/pulls/381/comments","review_comment_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/pulls/comments{/number}","comments_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/issues/381/comments","statuses_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/statuses/0642b634e66c4dddbc9a04d5e8b1fc8501c60095","head":{"label":"isomorphic-git:akaJes-patch-1","ref":"akaJes-patch-1","sha":"0642b634e66c4dddbc9a04d5e8b1fc8501c60095","user":{"login":"isomorphic-git","id":34904042,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0OTA0MDQy","avatar_url":"https://avatars0.githubusercontent.com/u/34904042?v=4","gravatar_id":"","url":"https://api.github.com/users/isomorphic-git","html_url":"https://github.com/isomorphic-git","followers_url":"https://api.github.com/users/isomorphic-git/followers","following_url":"https://api.github.com/users/isomorphic-git/following{/other_user}","gists_url":"https://api.github.com/users/isomorphic-git/gists{/gist_id}","starred_url":"https://api.github.com/users/isomorphic-git/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isomorphic-git/subscriptions","organizations_url":"https://api.github.com/users/isomorphic-git/orgs","repos_url":"https://api.github.com/users/isomorphic-git/repos","events_url":"https://api.github.com/users/isomorphic-git/events{/privacy}","received_events_url":"https://api.github.com/users/isomorphic-git/received_events","type":"Organization","site_admin":false},"repo":{"id":98770076,"node_id":"MDEwOlJlcG9zaXRvcnk5ODc3MDA3Ng==","name":"isomorphic-git","full_name":"isomorphic-git/isomorphic-git","owner":{"login":"isomorphic-git","id":34904042,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0OTA0MDQy","avatar_url":"https://avatars0.githubusercontent.com/u/34904042?v=4","gravatar_id":"","url":"https://api.github.com/users/isomorphic-git","html_url":"https://github.com/isomorphic-git","followers_url":"https://api.github.com/users/isomorphic-git/followers","following_url":"https://api.github.com/users/isomorphic-git/following{/other_user}","gists_url":"https://api.github.com/users/isomorphic-git/gists{/gist_id}","starred_url":"https://api.github.com/users/isomorphic-git/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isomorphic-git/subscriptions","organizations_url":"https://api.github.com/users/isomorphic-git/orgs","repos_url":"https://api.github.com/users/isomorphic-git/repos","events_url":"https://api.github.com/users/isomorphic-git/events{/privacy}","received_events_url":"https://api.github.com/users/isomorphic-git/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/isomorphic-git/isomorphic-git","description":"A pure JavaScript implementation of git for node and browsers!","fork":false,"url":"https://api.github.com/repos/isomorphic-git/isomorphic-git","forks_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/forks","keys_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/keys{/key_id}","collaborators_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/teams","hooks_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/hooks","issue_events_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/issues/events{/number}","events_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/events","assignees_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/assignees{/user}","branches_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/branches{/branch}","tags_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/tags","blobs_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/git/refs{/sha}","trees_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/git/trees{/sha}","statuses_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/statuses/{sha}","languages_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/languages","stargazers_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/stargazers","contributors_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/contributors","subscribers_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/subscribers","subscription_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/subscription","commits_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/commits{/sha}","git_commits_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/git/commits{/sha}","comments_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/comments{/number}","issue_comment_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/issues/comments{/number}","contents_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/contents/{+path}","compare_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/compare/{base}...{head}","merges_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/merges","archive_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/downloads","issues_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/issues{/number}","pulls_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/pulls{/number}","milestones_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/milestones{/number}","notifications_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/labels{/name}","releases_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/releases{/id}","deployments_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/deployments","created_at":"2017-07-30T02:26:00Z","updated_at":"2018-08-20T01:41:58Z","pushed_at":"2018-08-20T02:08:41Z","git_url":"git://github.com/isomorphic-git/isomorphic-git.git","ssh_url":"git@github.com:isomorphic-git/isomorphic-git.git","clone_url":"https://github.com/isomorphic-git/isomorphic-git.git","svn_url":"https://github.com/isomorphic-git/isomorphic-git","homepage":"https://isomorphic-git.org/","size":10171,"stargazers_count":3268,"watchers_count":3268,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":94,"mirror_url":null,"archived":false,"open_issues_count":51,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":94,"open_issues":51,"watchers":3268,"default_branch":"master"}},"base":{"label":"isomorphic-git:master","ref":"master","sha":"8cdd19a6d2ca147a4be173e38e18ad52290aec46","user":{"login":"isomorphic-git","id":34904042,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0OTA0MDQy","avatar_url":"https://avatars0.githubusercontent.com/u/34904042?v=4","gravatar_id":"","url":"https://api.github.com/users/isomorphic-git","html_url":"https://github.com/isomorphic-git","followers_url":"https://api.github.com/users/isomorphic-git/followers","following_url":"https://api.github.com/users/isomorphic-git/following{/other_user}","gists_url":"https://api.github.com/users/isomorphic-git/gists{/gist_id}","starred_url":"https://api.github.com/users/isomorphic-git/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isomorphic-git/subscriptions","organizations_url":"https://api.github.com/users/isomorphic-git/orgs","repos_url":"https://api.github.com/users/isomorphic-git/repos","events_url":"https://api.github.com/users/isomorphic-git/events{/privacy}","received_events_url":"https://api.github.com/users/isomorphic-git/received_events","type":"Organization","site_admin":false},"repo":{"id":98770076,"node_id":"MDEwOlJlcG9zaXRvcnk5ODc3MDA3Ng==","name":"isomorphic-git","full_name":"isomorphic-git/isomorphic-git","owner":{"login":"isomorphic-git","id":34904042,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0OTA0MDQy","avatar_url":"https://avatars0.githubusercontent.com/u/34904042?v=4","gravatar_id":"","url":"https://api.github.com/users/isomorphic-git","html_url":"https://github.com/isomorphic-git","followers_url":"https://api.github.com/users/isomorphic-git/followers","following_url":"https://api.github.com/users/isomorphic-git/following{/other_user}","gists_url":"https://api.github.com/users/isomorphic-git/gists{/gist_id}","starred_url":"https://api.github.com/users/isomorphic-git/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isomorphic-git/subscriptions","organizations_url":"https://api.github.com/users/isomorphic-git/orgs","repos_url":"https://api.github.com/users/isomorphic-git/repos","events_url":"https://api.github.com/users/isomorphic-git/events{/privacy}","received_events_url":"https://api.github.com/users/isomorphic-git/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/isomorphic-git/isomorphic-git","description":"A pure JavaScript implementation of git for node and browsers!","fork":false,"url":"https://api.github.com/repos/isomorphic-git/isomorphic-git","forks_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/forks","keys_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/keys{/key_id}","collaborators_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/teams","hooks_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/hooks","issue_events_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/issues/events{/number}","events_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/events","assignees_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/assignees{/user}","branches_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/branches{/branch}","tags_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/tags","blobs_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/git/refs{/sha}","trees_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/git/trees{/sha}","statuses_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/statuses/{sha}","languages_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/languages","stargazers_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/stargazers","contributors_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/contributors","subscribers_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/subscribers","subscription_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/subscription","commits_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/commits{/sha}","git_commits_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/git/commits{/sha}","comments_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/comments{/number}","issue_comment_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/issues/comments{/number}","contents_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/contents/{+path}","compare_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/compare/{base}...{head}","merges_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/merges","archive_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/downloads","issues_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/issues{/number}","pulls_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/pulls{/number}","milestones_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/milestones{/number}","notifications_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/labels{/name}","releases_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/releases{/id}","deployments_url":"https://api.github.com/repos/isomorphic-git/isomorphic-git/deployments","created_at":"2017-07-30T02:26:00Z","updated_at":"2018-08-20T01:41:58Z","pushed_at":"2018-08-20T02:08:41Z","git_url":"git://github.com/isomorphic-git/isomorphic-git.git","ssh_url":"git@github.com:isomorphic-git/isomorphic-git.git","clone_url":"https://github.com/isomorphic-git/isomorphic-git.git","svn_url":"https://github.com/isomorphic-git/isomorphic-git","homepage":"https://isomorphic-git.org/","size":10171,"stargazers_count":3268,"watchers_count":3268,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":94,"mirror_url":null,"archived":false,"open_issues_count":51,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":94,"open_issues":51,"watchers":3268,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/isomorphic-git/isomorphic-git/pulls/381"},"html":{"href":"https://github.com/isomorphic-git/isomorphic-git/pull/381"},"issue":{"href":"https://api.github.com/repos/isomorphic-git/isomorphic-git/issues/381"},"comments":{"href":"https://api.github.com/repos/isomorphic-git/isomorphic-git/issues/381/comments"},"review_comments":{"href":"https://api.github.com/repos/isomorphic-git/isomorphic-git/pulls/381/comments"},"review_comment":{"href":"https://api.github.com/repos/isomorphic-git/isomorphic-git/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/isomorphic-git/isomorphic-git/pulls/381/commits"},"statuses":{"href":"https://api.github.com/repos/isomorphic-git/isomorphic-git/statuses/0642b634e66c4dddbc9a04d5e8b1fc8501c60095"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"wmhilton"}}