{"action":"created","comment":{"url":"https://api.github.com/repos/libgit2/libgit2sharp/pulls/comments/24757172","id":24757172,"diff_hunk":"@@ -296,5 +296,69 @@ private string DebuggerDisplay\n                     \"Count = {0}\", Count);\n             }\n         }\n+\n+        /// <summary>\n+        /// Replaces entries in the <see cref=\"Index\"/> with entries from the specified commit.\n+        /// </summary>\n+        /// <param name=\"committish\">A revparse spec for the target commit object.</param>\n+        /// <param name=\"paths\">The list of paths (either files or directories) that should be considered.</param>\n+        /// <param name=\"explicitPathsOptions\">\n+        /// If set, the passed <paramref name=\"paths\"/> will be treated as explicit paths.\n+        /// Use these options to determine how unmatched explicit paths should be handled.\n+        /// </param>\n+        public virtual void Reset(string committish = \"HEAD\", IEnumerable<string> paths = null, ExplicitPathsOptions explicitPathsOptions = null)","path":"LibGit2Sharp/Index.cs","position":14,"original_position":14,"commit_id":"495123f1e342625726f58dcb930ff355004208b9","original_commit_id":"495123f1e342625726f58dcb930ff355004208b9","user":{"login":"nulltoken","id":92363,"avatar_url":"https://avatars.githubusercontent.com/u/92363?v=3","gravatar_id":"","url":"https://api.github.com/users/nulltoken","html_url":"https://github.com/nulltoken","followers_url":"https://api.github.com/users/nulltoken/followers","following_url":"https://api.github.com/users/nulltoken/following{/other_user}","gists_url":"https://api.github.com/users/nulltoken/gists{/gist_id}","starred_url":"https://api.github.com/users/nulltoken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nulltoken/subscriptions","organizations_url":"https://api.github.com/users/nulltoken/orgs","repos_url":"https://api.github.com/users/nulltoken/repos","events_url":"https://api.github.com/users/nulltoken/events{/privacy}","received_events_url":"https://api.github.com/users/nulltoken/received_events","type":"User","site_admin":false},"body":"Let's drop this overload. Defaulting to `HEAD` in the `Index` type makes little sense, now. The user will have to pass in a previously selected commit.","created_at":"2015-02-16T15:31:35Z","updated_at":"2015-02-16T15:31:35Z","html_url":"https://github.com/libgit2/libgit2sharp/pull/959#discussion_r24757172","pull_request_url":"https://api.github.com/repos/libgit2/libgit2sharp/pulls/959","_links":{"self":{"href":"https://api.github.com/repos/libgit2/libgit2sharp/pulls/comments/24757172"},"html":{"href":"https://github.com/libgit2/libgit2sharp/pull/959#discussion_r24757172"},"pull_request":{"href":"https://api.github.com/repos/libgit2/libgit2sharp/pulls/959"}}},"pull_request":{"url":"https://api.github.com/repos/libgit2/libgit2sharp/pulls/959","id":29326833,"html_url":"https://github.com/libgit2/libgit2sharp/pull/959","diff_url":"https://github.com/libgit2/libgit2sharp/pull/959.diff","patch_url":"https://github.com/libgit2/libgit2sharp/pull/959.patch","issue_url":"https://api.github.com/repos/libgit2/libgit2sharp/issues/959","number":959,"state":"open","locked":false,"title":"Move Repository.Reset(paths) into Index","user":{"login":"bording","id":753669,"avatar_url":"https://avatars.githubusercontent.com/u/753669?v=3","gravatar_id":"","url":"https://api.github.com/users/bording","html_url":"https://github.com/bording","followers_url":"https://api.github.com/users/bording/followers","following_url":"https://api.github.com/users/bording/following{/other_user}","gists_url":"https://api.github.com/users/bording/gists{/gist_id}","starred_url":"https://api.github.com/users/bording/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bording/subscriptions","organizations_url":"https://api.github.com/users/bording/orgs","repos_url":"https://api.github.com/users/bording/repos","events_url":"https://api.github.com/users/bording/events{/privacy}","received_events_url":"https://api.github.com/users/bording/received_events","type":"User","site_admin":false},"body":"Here is what I have so far. It's just about finished, but I had some questions, so I figured I'd go ahead and open the PR for changes I made for #805.\r\n\r\nThe two things I have left to do are add messages to the `Obsolete` attributes, and update the relevant tests so they aren't getting deprecation warnings. However, I wasn't sure which methods I should be using for the messages and the tests. Should they be pointing to the new `Repository.ResetPaths()` methods or to `Index.Reset()` instead?\r\n\r\nTo add the `ResetPaths()` methods I had to update the `IRepository` interface also. While doing this, I did start to wonder about how useful these new methods actually were vs. just calling `Index.Reset()` directly. Are these really needed?\r\n\r\nSomething else that I noticed while working on this is that the version of the method that takes a `committish` string has a couple of things I wanted to comment on.\r\n\r\n- First, it's using optional parameters, and I know #952 is talking about removing them from the public API surface. I figured that was out of scope for this PR, so I left them as is.\r\n\r\n- Secondly, when this method was in `RepositoryExtensions` it was using a private `LookUpCommit()` method. I changed this to use the internal `Repository.LookupCommit()` instead after verifying that it appeared to do the same thing.\r\n\r\n- Lastly, why does this version of the method have its own `IsBare` check vs. relying on the one that's already in the `Reset()` it calls? Unless looking up the commit from the `committish` is really expensive, it seems like there isn't a good reason for the duplicate check.","created_at":"2015-02-14T22:54:09Z","updated_at":"2015-02-16T15:31:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0abba5d502430fbf4986a85807b28604668d3f83","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/libgit2/libgit2sharp/pulls/959/commits","review_comments_url":"https://api.github.com/repos/libgit2/libgit2sharp/pulls/959/comments","review_comment_url":"https://api.github.com/repos/libgit2/libgit2sharp/pulls/comments/{number}","comments_url":"https://api.github.com/repos/libgit2/libgit2sharp/issues/959/comments","statuses_url":"https://api.github.com/repos/libgit2/libgit2sharp/statuses/495123f1e342625726f58dcb930ff355004208b9","head":{"label":"bording:moveRepositoryReset","ref":"moveRepositoryReset","sha":"495123f1e342625726f58dcb930ff355004208b9","user":{"login":"bording","id":753669,"avatar_url":"https://avatars.githubusercontent.com/u/753669?v=3","gravatar_id":"","url":"https://api.github.com/users/bording","html_url":"https://github.com/bording","followers_url":"https://api.github.com/users/bording/followers","following_url":"https://api.github.com/users/bording/following{/other_user}","gists_url":"https://api.github.com/users/bording/gists{/gist_id}","starred_url":"https://api.github.com/users/bording/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bording/subscriptions","organizations_url":"https://api.github.com/users/bording/orgs","repos_url":"https://api.github.com/users/bording/repos","events_url":"https://api.github.com/users/bording/events{/privacy}","received_events_url":"https://api.github.com/users/bording/received_events","type":"User","site_admin":false},"repo":{"id":30678739,"name":"libgit2sharp","full_name":"bording/libgit2sharp","owner":{"login":"bording","id":753669,"avatar_url":"https://avatars.githubusercontent.com/u/753669?v=3","gravatar_id":"","url":"https://api.github.com/users/bording","html_url":"https://github.com/bording","followers_url":"https://api.github.com/users/bording/followers","following_url":"https://api.github.com/users/bording/following{/other_user}","gists_url":"https://api.github.com/users/bording/gists{/gist_id}","starred_url":"https://api.github.com/users/bording/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bording/subscriptions","organizations_url":"https://api.github.com/users/bording/orgs","repos_url":"https://api.github.com/users/bording/repos","events_url":"https://api.github.com/users/bording/events{/privacy}","received_events_url":"https://api.github.com/users/bording/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bording/libgit2sharp","description":"Git + .Net/Mono = ❤","fork":true,"url":"https://api.github.com/repos/bording/libgit2sharp","forks_url":"https://api.github.com/repos/bording/libgit2sharp/forks","keys_url":"https://api.github.com/repos/bording/libgit2sharp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bording/libgit2sharp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bording/libgit2sharp/teams","hooks_url":"https://api.github.com/repos/bording/libgit2sharp/hooks","issue_events_url":"https://api.github.com/repos/bording/libgit2sharp/issues/events{/number}","events_url":"https://api.github.com/repos/bording/libgit2sharp/events","assignees_url":"https://api.github.com/repos/bording/libgit2sharp/assignees{/user}","branches_url":"https://api.github.com/repos/bording/libgit2sharp/branches{/branch}","tags_url":"https://api.github.com/repos/bording/libgit2sharp/tags","blobs_url":"https://api.github.com/repos/bording/libgit2sharp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bording/libgit2sharp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bording/libgit2sharp/git/refs{/sha}","trees_url":"https://api.github.com/repos/bording/libgit2sharp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bording/libgit2sharp/statuses/{sha}","languages_url":"https://api.github.com/repos/bording/libgit2sharp/languages","stargazers_url":"https://api.github.com/repos/bording/libgit2sharp/stargazers","contributors_url":"https://api.github.com/repos/bording/libgit2sharp/contributors","subscribers_url":"https://api.github.com/repos/bording/libgit2sharp/subscribers","subscription_url":"https://api.github.com/repos/bording/libgit2sharp/subscription","commits_url":"https://api.github.com/repos/bording/libgit2sharp/commits{/sha}","git_commits_url":"https://api.github.com/repos/bording/libgit2sharp/git/commits{/sha}","comments_url":"https://api.github.com/repos/bording/libgit2sharp/comments{/number}","issue_comment_url":"https://api.github.com/repos/bording/libgit2sharp/issues/comments/{number}","contents_url":"https://api.github.com/repos/bording/libgit2sharp/contents/{+path}","compare_url":"https://api.github.com/repos/bording/libgit2sharp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bording/libgit2sharp/merges","archive_url":"https://api.github.com/repos/bording/libgit2sharp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bording/libgit2sharp/downloads","issues_url":"https://api.github.com/repos/bording/libgit2sharp/issues{/number}","pulls_url":"https://api.github.com/repos/bording/libgit2sharp/pulls{/number}","milestones_url":"https://api.github.com/repos/bording/libgit2sharp/milestones{/number}","notifications_url":"https://api.github.com/repos/bording/libgit2sharp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bording/libgit2sharp/labels{/name}","releases_url":"https://api.github.com/repos/bording/libgit2sharp/releases{/id}","created_at":"2015-02-12T01:13:11Z","updated_at":"2015-02-14T06:41:02Z","pushed_at":"2015-02-15T18:57:29Z","git_url":"git://github.com/bording/libgit2sharp.git","ssh_url":"git@github.com:bording/libgit2sharp.git","clone_url":"https://github.com/bording/libgit2sharp.git","svn_url":"https://github.com/bording/libgit2sharp","homepage":"http://libgit2.github.com","size":149364,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"vNext"}},"base":{"label":"libgit2:vNext","ref":"vNext","sha":"4d41aba6464404f4de86fc7dbd9fe899dc84dd1d","user":{"login":"libgit2","id":394745,"avatar_url":"https://avatars.githubusercontent.com/u/394745?v=3","gravatar_id":"","url":"https://api.github.com/users/libgit2","html_url":"https://github.com/libgit2","followers_url":"https://api.github.com/users/libgit2/followers","following_url":"https://api.github.com/users/libgit2/following{/other_user}","gists_url":"https://api.github.com/users/libgit2/gists{/gist_id}","starred_url":"https://api.github.com/users/libgit2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libgit2/subscriptions","organizations_url":"https://api.github.com/users/libgit2/orgs","repos_url":"https://api.github.com/users/libgit2/repos","events_url":"https://api.github.com/users/libgit2/events{/privacy}","received_events_url":"https://api.github.com/users/libgit2/received_events","type":"Organization","site_admin":false},"repo":{"id":1415168,"name":"libgit2sharp","full_name":"libgit2/libgit2sharp","owner":{"login":"libgit2","id":394745,"avatar_url":"https://avatars.githubusercontent.com/u/394745?v=3","gravatar_id":"","url":"https://api.github.com/users/libgit2","html_url":"https://github.com/libgit2","followers_url":"https://api.github.com/users/libgit2/followers","following_url":"https://api.github.com/users/libgit2/following{/other_user}","gists_url":"https://api.github.com/users/libgit2/gists{/gist_id}","starred_url":"https://api.github.com/users/libgit2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libgit2/subscriptions","organizations_url":"https://api.github.com/users/libgit2/orgs","repos_url":"https://api.github.com/users/libgit2/repos","events_url":"https://api.github.com/users/libgit2/events{/privacy}","received_events_url":"https://api.github.com/users/libgit2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libgit2/libgit2sharp","description":"Git + .Net/Mono = ❤","fork":false,"url":"https://api.github.com/repos/libgit2/libgit2sharp","forks_url":"https://api.github.com/repos/libgit2/libgit2sharp/forks","keys_url":"https://api.github.com/repos/libgit2/libgit2sharp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libgit2/libgit2sharp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libgit2/libgit2sharp/teams","hooks_url":"https://api.github.com/repos/libgit2/libgit2sharp/hooks","issue_events_url":"https://api.github.com/repos/libgit2/libgit2sharp/issues/events{/number}","events_url":"https://api.github.com/repos/libgit2/libgit2sharp/events","assignees_url":"https://api.github.com/repos/libgit2/libgit2sharp/assignees{/user}","branches_url":"https://api.github.com/repos/libgit2/libgit2sharp/branches{/branch}","tags_url":"https://api.github.com/repos/libgit2/libgit2sharp/tags","blobs_url":"https://api.github.com/repos/libgit2/libgit2sharp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libgit2/libgit2sharp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libgit2/libgit2sharp/git/refs{/sha}","trees_url":"https://api.github.com/repos/libgit2/libgit2sharp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libgit2/libgit2sharp/statuses/{sha}","languages_url":"https://api.github.com/repos/libgit2/libgit2sharp/languages","stargazers_url":"https://api.github.com/repos/libgit2/libgit2sharp/stargazers","contributors_url":"https://api.github.com/repos/libgit2/libgit2sharp/contributors","subscribers_url":"https://api.github.com/repos/libgit2/libgit2sharp/subscribers","subscription_url":"https://api.github.com/repos/libgit2/libgit2sharp/subscription","commits_url":"https://api.github.com/repos/libgit2/libgit2sharp/commits{/sha}","git_commits_url":"https://api.github.com/repos/libgit2/libgit2sharp/git/commits{/sha}","comments_url":"https://api.github.com/repos/libgit2/libgit2sharp/comments{/number}","issue_comment_url":"https://api.github.com/repos/libgit2/libgit2sharp/issues/comments/{number}","contents_url":"https://api.github.com/repos/libgit2/libgit2sharp/contents/{+path}","compare_url":"https://api.github.com/repos/libgit2/libgit2sharp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libgit2/libgit2sharp/merges","archive_url":"https://api.github.com/repos/libgit2/libgit2sharp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libgit2/libgit2sharp/downloads","issues_url":"https://api.github.com/repos/libgit2/libgit2sharp/issues{/number}","pulls_url":"https://api.github.com/repos/libgit2/libgit2sharp/pulls{/number}","milestones_url":"https://api.github.com/repos/libgit2/libgit2sharp/milestones{/number}","notifications_url":"https://api.github.com/repos/libgit2/libgit2sharp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libgit2/libgit2sharp/labels{/name}","releases_url":"https://api.github.com/repos/libgit2/libgit2sharp/releases{/id}","created_at":"2011-02-26T16:44:49Z","updated_at":"2015-02-16T03:07:21Z","pushed_at":"2015-02-15T20:00:13Z","git_url":"git://github.com/libgit2/libgit2sharp.git","ssh_url":"git@github.com:libgit2/libgit2sharp.git","clone_url":"https://github.com/libgit2/libgit2sharp.git","svn_url":"https://github.com/libgit2/libgit2sharp","homepage":"http://libgit2.github.com","size":204267,"stargazers_count":707,"watchers_count":707,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":285,"mirror_url":null,"open_issues_count":121,"forks":285,"open_issues":121,"watchers":707,"default_branch":"vNext"}},"_links":{"self":{"href":"https://api.github.com/repos/libgit2/libgit2sharp/pulls/959"},"html":{"href":"https://github.com/libgit2/libgit2sharp/pull/959"},"issue":{"href":"https://api.github.com/repos/libgit2/libgit2sharp/issues/959"},"comments":{"href":"https://api.github.com/repos/libgit2/libgit2sharp/issues/959/comments"},"review_comments":{"href":"https://api.github.com/repos/libgit2/libgit2sharp/pulls/959/comments"},"review_comment":{"href":"https://api.github.com/repos/libgit2/libgit2sharp/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/libgit2/libgit2sharp/pulls/959/commits"},"statuses":{"href":"https://api.github.com/repos/libgit2/libgit2sharp/statuses/495123f1e342625726f58dcb930ff355004208b9"}}}}