{"action":"created","comment":{"url":"https://api.github.com/repos/pranitbauva1997/git/pulls/comments/69855872","id":69855872,"diff_hunk":"@@ -359,6 +360,47 @@ static int bisect_next_check(const struct bisect_terms *state,\n \treturn 0;\n }\n \n+static int get_terms(struct bisect_terms *term)\n+{\n+\tFILE *fp;\n+\tfp = fopen(git_path_bisect_write_terms(), \"r\");\n+\tif (!fp)\n+\t\treturn -1;\n+\n+\tbisect_terms_reset(term);\n+\tif (strbuf_getline(&term->term_bad, fp) == EOF) {\n+\t\tfclose(fp);\n+\t\treturn -1;\n+\t}\n+\tif (strbuf_getline(&term->term_good, fp) == EOF) {\n+\t\tfclose(fp);\n+\t\treturn -1;\n+\t}\n+\n+\tfclose(fp);\n+\treturn 0;\n+}\n+\n+static int bisect_terms(struct bisect_terms *term, const char *arg)","path":"builtin/bisect--helper.c","position":214,"original_position":33,"commit_id":"1d9dbde61dd6d5401cc9fcf7bf2fdc34dba12175","original_commit_id":"1d9dbde61dd6d5401cc9fcf7bf2fdc34dba12175","user":{"login":"chriscool","id":208954,"avatar_url":"https://avatars.githubusercontent.com/u/208954?v=3","gravatar_id":"","url":"https://api.github.com/users/chriscool","html_url":"https://github.com/chriscool","followers_url":"https://api.github.com/users/chriscool/followers","following_url":"https://api.github.com/users/chriscool/following{/other_user}","gists_url":"https://api.github.com/users/chriscool/gists{/gist_id}","starred_url":"https://api.github.com/users/chriscool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriscool/subscriptions","organizations_url":"https://api.github.com/users/chriscool/orgs","repos_url":"https://api.github.com/users/chriscool/repos","events_url":"https://api.github.com/users/chriscool/events{/privacy}","received_events_url":"https://api.github.com/users/chriscool/received_events","type":"User","site_admin":false},"body":"Please use \"terms\" everywhere instead of of \"term\" for the `struct bisect_terms` argument name. ","created_at":"2016-07-07T06:17:06Z","updated_at":"2016-07-07T06:17:06Z","html_url":"https://github.com/pranitbauva1997/git/pull/16#discussion_r69855872","pull_request_url":"https://api.github.com/repos/pranitbauva1997/git/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/pranitbauva1997/git/pulls/comments/69855872"},"html":{"href":"https://github.com/pranitbauva1997/git/pull/16#discussion_r69855872"},"pull_request":{"href":"https://api.github.com/repos/pranitbauva1997/git/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/pranitbauva1997/git/pulls/16","id":73957186,"html_url":"https://github.com/pranitbauva1997/git/pull/16","diff_url":"https://github.com/pranitbauva1997/git/pull/16.diff","patch_url":"https://github.com/pranitbauva1997/git/pull/16.patch","issue_url":"https://api.github.com/repos/pranitbauva1997/git/issues/16","number":16,"state":"open","locked":false,"title":"bisect--helper: `check_and_set_terms` shell function in C","user":{"login":"pranitbauva1997","id":2959938,"avatar_url":"https://avatars.githubusercontent.com/u/2959938?v=3","gravatar_id":"","url":"https://api.github.com/users/pranitbauva1997","html_url":"https://github.com/pranitbauva1997","followers_url":"https://api.github.com/users/pranitbauva1997/followers","following_url":"https://api.github.com/users/pranitbauva1997/following{/other_user}","gists_url":"https://api.github.com/users/pranitbauva1997/gists{/gist_id}","starred_url":"https://api.github.com/users/pranitbauva1997/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranitbauva1997/subscriptions","organizations_url":"https://api.github.com/users/pranitbauva1997/orgs","repos_url":"https://api.github.com/users/pranitbauva1997/repos","events_url":"https://api.github.com/users/pranitbauva1997/events{/privacy}","received_events_url":"https://api.github.com/users/pranitbauva1997/received_events","type":"User","site_admin":false},"body":"Reimplement the `check_and_set_terms` shell function in C and add\r\n`check-and-set-terms` subcommand to `git bisect--helper` to call it from\r\ngit-bisect.sh\r\n\r\nUsing `--check-and-set-terms` subcommand is a temporary measure to port\r\nshell function in C so as to use the existing test suite. As more\r\nfunctions are ported, this subcommand will be retired and will be called\r\nby some other methods.\r\n\r\ncheck_and_set_terms() sets and receives two global variables namely\r\nTERM_GOOD and TERM_BAD in the shell script. Luckily the file BISECT_TERMS\r\nalso contains the value of those variables so its appropriate to evoke the\r\nmethod get_terms() after calling the subcommand so that it retrieves the\r\nvalue of TERM_GOOD and TERM_BAD from the file BISECT_TERMS. The two\r\nglobal variables are passed as arguments to the subcommand. A struct is\r\nalso introduced to be used as a C counter part of the global variables.\r\n\r\nMentored-by: Lars Schneider <larsxschneider@gmail.com>\r\nMentored-by: Christian Couder <chriscool@tuxfamily.org>\r\nSigned-off-by: Pranit Bauva <pranit.bauva@gmail.com>","created_at":"2016-06-15T18:06:48Z","updated_at":"2016-07-07T06:17:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1d53582125dc9f158511d6f7bc0248dcd5c4d9e9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pranitbauva1997/git/pulls/16/commits","review_comments_url":"https://api.github.com/repos/pranitbauva1997/git/pulls/16/comments","review_comment_url":"https://api.github.com/repos/pranitbauva1997/git/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pranitbauva1997/git/issues/16/comments","statuses_url":"https://api.github.com/repos/pranitbauva1997/git/statuses/1d9dbde61dd6d5401cc9fcf7bf2fdc34dba12175","head":{"label":"pranitbauva1997:check-and-set-terms","ref":"check-and-set-terms","sha":"1d9dbde61dd6d5401cc9fcf7bf2fdc34dba12175","user":{"login":"pranitbauva1997","id":2959938,"avatar_url":"https://avatars.githubusercontent.com/u/2959938?v=3","gravatar_id":"","url":"https://api.github.com/users/pranitbauva1997","html_url":"https://github.com/pranitbauva1997","followers_url":"https://api.github.com/users/pranitbauva1997/followers","following_url":"https://api.github.com/users/pranitbauva1997/following{/other_user}","gists_url":"https://api.github.com/users/pranitbauva1997/gists{/gist_id}","starred_url":"https://api.github.com/users/pranitbauva1997/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranitbauva1997/subscriptions","organizations_url":"https://api.github.com/users/pranitbauva1997/orgs","repos_url":"https://api.github.com/users/pranitbauva1997/repos","events_url":"https://api.github.com/users/pranitbauva1997/events{/privacy}","received_events_url":"https://api.github.com/users/pranitbauva1997/received_events","type":"User","site_admin":false},"repo":{"id":52337111,"name":"git","full_name":"pranitbauva1997/git","owner":{"login":"pranitbauva1997","id":2959938,"avatar_url":"https://avatars.githubusercontent.com/u/2959938?v=3","gravatar_id":"","url":"https://api.github.com/users/pranitbauva1997","html_url":"https://github.com/pranitbauva1997","followers_url":"https://api.github.com/users/pranitbauva1997/followers","following_url":"https://api.github.com/users/pranitbauva1997/following{/other_user}","gists_url":"https://api.github.com/users/pranitbauva1997/gists{/gist_id}","starred_url":"https://api.github.com/users/pranitbauva1997/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranitbauva1997/subscriptions","organizations_url":"https://api.github.com/users/pranitbauva1997/orgs","repos_url":"https://api.github.com/users/pranitbauva1997/repos","events_url":"https://api.github.com/users/pranitbauva1997/events{/privacy}","received_events_url":"https://api.github.com/users/pranitbauva1997/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pranitbauva1997/git","description":"Git Source Code Mirror - This is a publish-only repository and all pull requests are ignored. Please follow Documentation/SubmittingPatches procedure for any of your improvements.","fork":true,"url":"https://api.github.com/repos/pranitbauva1997/git","forks_url":"https://api.github.com/repos/pranitbauva1997/git/forks","keys_url":"https://api.github.com/repos/pranitbauva1997/git/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pranitbauva1997/git/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pranitbauva1997/git/teams","hooks_url":"https://api.github.com/repos/pranitbauva1997/git/hooks","issue_events_url":"https://api.github.com/repos/pranitbauva1997/git/issues/events{/number}","events_url":"https://api.github.com/repos/pranitbauva1997/git/events","assignees_url":"https://api.github.com/repos/pranitbauva1997/git/assignees{/user}","branches_url":"https://api.github.com/repos/pranitbauva1997/git/branches{/branch}","tags_url":"https://api.github.com/repos/pranitbauva1997/git/tags","blobs_url":"https://api.github.com/repos/pranitbauva1997/git/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pranitbauva1997/git/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pranitbauva1997/git/git/refs{/sha}","trees_url":"https://api.github.com/repos/pranitbauva1997/git/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pranitbauva1997/git/statuses/{sha}","languages_url":"https://api.github.com/repos/pranitbauva1997/git/languages","stargazers_url":"https://api.github.com/repos/pranitbauva1997/git/stargazers","contributors_url":"https://api.github.com/repos/pranitbauva1997/git/contributors","subscribers_url":"https://api.github.com/repos/pranitbauva1997/git/subscribers","subscription_url":"https://api.github.com/repos/pranitbauva1997/git/subscription","commits_url":"https://api.github.com/repos/pranitbauva1997/git/commits{/sha}","git_commits_url":"https://api.github.com/repos/pranitbauva1997/git/git/commits{/sha}","comments_url":"https://api.github.com/repos/pranitbauva1997/git/comments{/number}","issue_comment_url":"https://api.github.com/repos/pranitbauva1997/git/issues/comments{/number}","contents_url":"https://api.github.com/repos/pranitbauva1997/git/contents/{+path}","compare_url":"https://api.github.com/repos/pranitbauva1997/git/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pranitbauva1997/git/merges","archive_url":"https://api.github.com/repos/pranitbauva1997/git/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pranitbauva1997/git/downloads","issues_url":"https://api.github.com/repos/pranitbauva1997/git/issues{/number}","pulls_url":"https://api.github.com/repos/pranitbauva1997/git/pulls{/number}","milestones_url":"https://api.github.com/repos/pranitbauva1997/git/milestones{/number}","notifications_url":"https://api.github.com/repos/pranitbauva1997/git/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pranitbauva1997/git/labels{/name}","releases_url":"https://api.github.com/repos/pranitbauva1997/git/releases{/id}","deployments_url":"https://api.github.com/repos/pranitbauva1997/git/deployments","created_at":"2016-02-23T06:43:02Z","updated_at":"2016-02-23T06:44:15Z","pushed_at":"2016-07-06T22:09:37Z","git_url":"git://github.com/pranitbauva1997/git.git","ssh_url":"git@github.com:pranitbauva1997/git.git","clone_url":"https://github.com/pranitbauva1997/git.git","svn_url":"https://github.com/pranitbauva1997/git","homepage":"This is a publish-only repository and all pull requests are ignored. Please follow Documentation/SubmittingPatches procedure for any of your improvements.","size":92509,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"pranitbauva1997:bisect-reset","ref":"bisect-reset","sha":"14908b8fd2e6fb99a4b7839d01a9a41a620e1366","user":{"login":"pranitbauva1997","id":2959938,"avatar_url":"https://avatars.githubusercontent.com/u/2959938?v=3","gravatar_id":"","url":"https://api.github.com/users/pranitbauva1997","html_url":"https://github.com/pranitbauva1997","followers_url":"https://api.github.com/users/pranitbauva1997/followers","following_url":"https://api.github.com/users/pranitbauva1997/following{/other_user}","gists_url":"https://api.github.com/users/pranitbauva1997/gists{/gist_id}","starred_url":"https://api.github.com/users/pranitbauva1997/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranitbauva1997/subscriptions","organizations_url":"https://api.github.com/users/pranitbauva1997/orgs","repos_url":"https://api.github.com/users/pranitbauva1997/repos","events_url":"https://api.github.com/users/pranitbauva1997/events{/privacy}","received_events_url":"https://api.github.com/users/pranitbauva1997/received_events","type":"User","site_admin":false},"repo":{"id":52337111,"name":"git","full_name":"pranitbauva1997/git","owner":{"login":"pranitbauva1997","id":2959938,"avatar_url":"https://avatars.githubusercontent.com/u/2959938?v=3","gravatar_id":"","url":"https://api.github.com/users/pranitbauva1997","html_url":"https://github.com/pranitbauva1997","followers_url":"https://api.github.com/users/pranitbauva1997/followers","following_url":"https://api.github.com/users/pranitbauva1997/following{/other_user}","gists_url":"https://api.github.com/users/pranitbauva1997/gists{/gist_id}","starred_url":"https://api.github.com/users/pranitbauva1997/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranitbauva1997/subscriptions","organizations_url":"https://api.github.com/users/pranitbauva1997/orgs","repos_url":"https://api.github.com/users/pranitbauva1997/repos","events_url":"https://api.github.com/users/pranitbauva1997/events{/privacy}","received_events_url":"https://api.github.com/users/pranitbauva1997/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pranitbauva1997/git","description":"Git Source Code Mirror - This is a publish-only repository and all pull requests are ignored. Please follow Documentation/SubmittingPatches procedure for any of your improvements.","fork":true,"url":"https://api.github.com/repos/pranitbauva1997/git","forks_url":"https://api.github.com/repos/pranitbauva1997/git/forks","keys_url":"https://api.github.com/repos/pranitbauva1997/git/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pranitbauva1997/git/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pranitbauva1997/git/teams","hooks_url":"https://api.github.com/repos/pranitbauva1997/git/hooks","issue_events_url":"https://api.github.com/repos/pranitbauva1997/git/issues/events{/number}","events_url":"https://api.github.com/repos/pranitbauva1997/git/events","assignees_url":"https://api.github.com/repos/pranitbauva1997/git/assignees{/user}","branches_url":"https://api.github.com/repos/pranitbauva1997/git/branches{/branch}","tags_url":"https://api.github.com/repos/pranitbauva1997/git/tags","blobs_url":"https://api.github.com/repos/pranitbauva1997/git/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pranitbauva1997/git/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pranitbauva1997/git/git/refs{/sha}","trees_url":"https://api.github.com/repos/pranitbauva1997/git/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pranitbauva1997/git/statuses/{sha}","languages_url":"https://api.github.com/repos/pranitbauva1997/git/languages","stargazers_url":"https://api.github.com/repos/pranitbauva1997/git/stargazers","contributors_url":"https://api.github.com/repos/pranitbauva1997/git/contributors","subscribers_url":"https://api.github.com/repos/pranitbauva1997/git/subscribers","subscription_url":"https://api.github.com/repos/pranitbauva1997/git/subscription","commits_url":"https://api.github.com/repos/pranitbauva1997/git/commits{/sha}","git_commits_url":"https://api.github.com/repos/pranitbauva1997/git/git/commits{/sha}","comments_url":"https://api.github.com/repos/pranitbauva1997/git/comments{/number}","issue_comment_url":"https://api.github.com/repos/pranitbauva1997/git/issues/comments{/number}","contents_url":"https://api.github.com/repos/pranitbauva1997/git/contents/{+path}","compare_url":"https://api.github.com/repos/pranitbauva1997/git/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pranitbauva1997/git/merges","archive_url":"https://api.github.com/repos/pranitbauva1997/git/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pranitbauva1997/git/downloads","issues_url":"https://api.github.com/repos/pranitbauva1997/git/issues{/number}","pulls_url":"https://api.github.com/repos/pranitbauva1997/git/pulls{/number}","milestones_url":"https://api.github.com/repos/pranitbauva1997/git/milestones{/number}","notifications_url":"https://api.github.com/repos/pranitbauva1997/git/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pranitbauva1997/git/labels{/name}","releases_url":"https://api.github.com/repos/pranitbauva1997/git/releases{/id}","deployments_url":"https://api.github.com/repos/pranitbauva1997/git/deployments","created_at":"2016-02-23T06:43:02Z","updated_at":"2016-02-23T06:44:15Z","pushed_at":"2016-07-06T22:09:37Z","git_url":"git://github.com/pranitbauva1997/git.git","ssh_url":"git@github.com:pranitbauva1997/git.git","clone_url":"https://github.com/pranitbauva1997/git.git","svn_url":"https://github.com/pranitbauva1997/git","homepage":"This is a publish-only repository and all pull requests are ignored. Please follow Documentation/SubmittingPatches procedure for any of your improvements.","size":92509,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pranitbauva1997/git/pulls/16"},"html":{"href":"https://github.com/pranitbauva1997/git/pull/16"},"issue":{"href":"https://api.github.com/repos/pranitbauva1997/git/issues/16"},"comments":{"href":"https://api.github.com/repos/pranitbauva1997/git/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/pranitbauva1997/git/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/pranitbauva1997/git/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pranitbauva1997/git/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/pranitbauva1997/git/statuses/1d9dbde61dd6d5401cc9fcf7bf2fdc34dba12175"}}}}
{"actor":{"display_login":"chriscool"}}