{"action":"opened","number":3711,"pull_request":{"url":"https://api.github.com/repos/libgit2/libgit2/pulls/3711","id":64252944,"html_url":"https://github.com/libgit2/libgit2/pull/3711","diff_url":"https://github.com/libgit2/libgit2/pull/3711.diff","patch_url":"https://github.com/libgit2/libgit2/pull/3711.patch","issue_url":"https://api.github.com/repos/libgit2/libgit2/issues/3711","number":3711,"state":"open","locked":false,"title":"API to discover repository respecting standard environment variables","user":{"login":"joshtriplett","id":162737,"avatar_url":"https://avatars.githubusercontent.com/u/162737?v=3","gravatar_id":"","url":"https://api.github.com/users/joshtriplett","html_url":"https://github.com/joshtriplett","followers_url":"https://api.github.com/users/joshtriplett/followers","following_url":"https://api.github.com/users/joshtriplett/following{/other_user}","gists_url":"https://api.github.com/users/joshtriplett/gists{/gist_id}","starred_url":"https://api.github.com/users/joshtriplett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshtriplett/subscriptions","organizations_url":"https://api.github.com/users/joshtriplett/orgs","repos_url":"https://api.github.com/users/joshtriplett/repos","events_url":"https://api.github.com/users/joshtriplett/events{/privacy}","received_events_url":"https://api.github.com/users/joshtriplett/received_events","type":"User","site_admin":false},"body":"`git_repository_discover` provides parameters for the start path, whether to search across filesystems, and what ceiling directories to stop at.  git commands have standard environment variables and defaults for each of those.  To avoid duplicate environment variable handling in users of libgit2, please consider adding a `git_repository_discover_default` function, which automatically uses `$GIT_DIR` (defaulting to \".\"), `$GIT_DISCOVERY_ACROSS_FILESYSTEM`, and `$GIT_CEILING_DIRECTORIES`.  Commands that intend to act just like those built into git itself could then call this function to get the expected default behavior.","created_at":"2016-03-27T00:07:55Z","updated_at":"2016-03-27T00:07:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/libgit2/libgit2/pulls/3711/commits","review_comments_url":"https://api.github.com/repos/libgit2/libgit2/pulls/3711/comments","review_comment_url":"https://api.github.com/repos/libgit2/libgit2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libgit2/libgit2/issues/3711/comments","statuses_url":"https://api.github.com/repos/libgit2/libgit2/statuses/42b595b4630d3b91f1230296f9ee638d8aaf7211","head":{"label":"joshtriplett:git_repository_discover_default","ref":"git_repository_discover_default","sha":"42b595b4630d3b91f1230296f9ee638d8aaf7211","user":{"login":"joshtriplett","id":162737,"avatar_url":"https://avatars.githubusercontent.com/u/162737?v=3","gravatar_id":"","url":"https://api.github.com/users/joshtriplett","html_url":"https://github.com/joshtriplett","followers_url":"https://api.github.com/users/joshtriplett/followers","following_url":"https://api.github.com/users/joshtriplett/following{/other_user}","gists_url":"https://api.github.com/users/joshtriplett/gists{/gist_id}","starred_url":"https://api.github.com/users/joshtriplett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshtriplett/subscriptions","organizations_url":"https://api.github.com/users/joshtriplett/orgs","repos_url":"https://api.github.com/users/joshtriplett/repos","events_url":"https://api.github.com/users/joshtriplett/events{/privacy}","received_events_url":"https://api.github.com/users/joshtriplett/received_events","type":"User","site_admin":false},"repo":{"id":5384914,"name":"libgit2","full_name":"joshtriplett/libgit2","owner":{"login":"joshtriplett","id":162737,"avatar_url":"https://avatars.githubusercontent.com/u/162737?v=3","gravatar_id":"","url":"https://api.github.com/users/joshtriplett","html_url":"https://github.com/joshtriplett","followers_url":"https://api.github.com/users/joshtriplett/followers","following_url":"https://api.github.com/users/joshtriplett/following{/other_user}","gists_url":"https://api.github.com/users/joshtriplett/gists{/gist_id}","starred_url":"https://api.github.com/users/joshtriplett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshtriplett/subscriptions","organizations_url":"https://api.github.com/users/joshtriplett/orgs","repos_url":"https://api.github.com/users/joshtriplett/repos","events_url":"https://api.github.com/users/joshtriplett/events{/privacy}","received_events_url":"https://api.github.com/users/joshtriplett/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joshtriplett/libgit2","description":"The Library","fork":true,"url":"https://api.github.com/repos/joshtriplett/libgit2","forks_url":"https://api.github.com/repos/joshtriplett/libgit2/forks","keys_url":"https://api.github.com/repos/joshtriplett/libgit2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joshtriplett/libgit2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joshtriplett/libgit2/teams","hooks_url":"https://api.github.com/repos/joshtriplett/libgit2/hooks","issue_events_url":"https://api.github.com/repos/joshtriplett/libgit2/issues/events{/number}","events_url":"https://api.github.com/repos/joshtriplett/libgit2/events","assignees_url":"https://api.github.com/repos/joshtriplett/libgit2/assignees{/user}","branches_url":"https://api.github.com/repos/joshtriplett/libgit2/branches{/branch}","tags_url":"https://api.github.com/repos/joshtriplett/libgit2/tags","blobs_url":"https://api.github.com/repos/joshtriplett/libgit2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joshtriplett/libgit2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joshtriplett/libgit2/git/refs{/sha}","trees_url":"https://api.github.com/repos/joshtriplett/libgit2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joshtriplett/libgit2/statuses/{sha}","languages_url":"https://api.github.com/repos/joshtriplett/libgit2/languages","stargazers_url":"https://api.github.com/repos/joshtriplett/libgit2/stargazers","contributors_url":"https://api.github.com/repos/joshtriplett/libgit2/contributors","subscribers_url":"https://api.github.com/repos/joshtriplett/libgit2/subscribers","subscription_url":"https://api.github.com/repos/joshtriplett/libgit2/subscription","commits_url":"https://api.github.com/repos/joshtriplett/libgit2/commits{/sha}","git_commits_url":"https://api.github.com/repos/joshtriplett/libgit2/git/commits{/sha}","comments_url":"https://api.github.com/repos/joshtriplett/libgit2/comments{/number}","issue_comment_url":"https://api.github.com/repos/joshtriplett/libgit2/issues/comments{/number}","contents_url":"https://api.github.com/repos/joshtriplett/libgit2/contents/{+path}","compare_url":"https://api.github.com/repos/joshtriplett/libgit2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joshtriplett/libgit2/merges","archive_url":"https://api.github.com/repos/joshtriplett/libgit2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joshtriplett/libgit2/downloads","issues_url":"https://api.github.com/repos/joshtriplett/libgit2/issues{/number}","pulls_url":"https://api.github.com/repos/joshtriplett/libgit2/pulls{/number}","milestones_url":"https://api.github.com/repos/joshtriplett/libgit2/milestones{/number}","notifications_url":"https://api.github.com/repos/joshtriplett/libgit2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joshtriplett/libgit2/labels{/name}","releases_url":"https://api.github.com/repos/joshtriplett/libgit2/releases{/id}","deployments_url":"https://api.github.com/repos/joshtriplett/libgit2/deployments","created_at":"2012-08-12T01:12:44Z","updated_at":"2013-10-09T11:36:43Z","pushed_at":"2016-03-27T00:06:54Z","git_url":"git://github.com/joshtriplett/libgit2.git","ssh_url":"git@github.com:joshtriplett/libgit2.git","clone_url":"https://github.com/joshtriplett/libgit2.git","svn_url":"https://github.com/joshtriplett/libgit2","homepage":"http://libgit2.github.com","size":22652,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"libgit2:master","ref":"master","sha":"7b29be31c2f03b9c85dd4545f62acd5c95f56e96","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":901662,"name":"libgit2","full_name":"libgit2/libgit2","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/libgit2","description":"The Library","fork":false,"url":"https://api.github.com/repos/libgit2/libgit2","forks_url":"https://api.github.com/repos/libgit2/libgit2/forks","keys_url":"https://api.github.com/repos/libgit2/libgit2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libgit2/libgit2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libgit2/libgit2/teams","hooks_url":"https://api.github.com/repos/libgit2/libgit2/hooks","issue_events_url":"https://api.github.com/repos/libgit2/libgit2/issues/events{/number}","events_url":"https://api.github.com/repos/libgit2/libgit2/events","assignees_url":"https://api.github.com/repos/libgit2/libgit2/assignees{/user}","branches_url":"https://api.github.com/repos/libgit2/libgit2/branches{/branch}","tags_url":"https://api.github.com/repos/libgit2/libgit2/tags","blobs_url":"https://api.github.com/repos/libgit2/libgit2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libgit2/libgit2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libgit2/libgit2/git/refs{/sha}","trees_url":"https://api.github.com/repos/libgit2/libgit2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libgit2/libgit2/statuses/{sha}","languages_url":"https://api.github.com/repos/libgit2/libgit2/languages","stargazers_url":"https://api.github.com/repos/libgit2/libgit2/stargazers","contributors_url":"https://api.github.com/repos/libgit2/libgit2/contributors","subscribers_url":"https://api.github.com/repos/libgit2/libgit2/subscribers","subscription_url":"https://api.github.com/repos/libgit2/libgit2/subscription","commits_url":"https://api.github.com/repos/libgit2/libgit2/commits{/sha}","git_commits_url":"https://api.github.com/repos/libgit2/libgit2/git/commits{/sha}","comments_url":"https://api.github.com/repos/libgit2/libgit2/comments{/number}","issue_comment_url":"https://api.github.com/repos/libgit2/libgit2/issues/comments{/number}","contents_url":"https://api.github.com/repos/libgit2/libgit2/contents/{+path}","compare_url":"https://api.github.com/repos/libgit2/libgit2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libgit2/libgit2/merges","archive_url":"https://api.github.com/repos/libgit2/libgit2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libgit2/libgit2/downloads","issues_url":"https://api.github.com/repos/libgit2/libgit2/issues{/number}","pulls_url":"https://api.github.com/repos/libgit2/libgit2/pulls{/number}","milestones_url":"https://api.github.com/repos/libgit2/libgit2/milestones{/number}","notifications_url":"https://api.github.com/repos/libgit2/libgit2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libgit2/libgit2/labels{/name}","releases_url":"https://api.github.com/repos/libgit2/libgit2/releases{/id}","deployments_url":"https://api.github.com/repos/libgit2/libgit2/deployments","created_at":"2010-09-10T16:17:48Z","updated_at":"2016-03-26T17:44:55Z","pushed_at":"2016-03-26T12:39:08Z","git_url":"git://github.com/libgit2/libgit2.git","ssh_url":"git@github.com:libgit2/libgit2.git","clone_url":"https://github.com/libgit2/libgit2.git","svn_url":"https://github.com/libgit2/libgit2","homepage":"http://libgit2.github.com","size":65777,"stargazers_count":5551,"watchers_count":5551,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1335,"mirror_url":null,"open_issues_count":138,"forks":1335,"open_issues":138,"watchers":5551,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libgit2/libgit2/pulls/3711"},"html":{"href":"https://github.com/libgit2/libgit2/pull/3711"},"issue":{"href":"https://api.github.com/repos/libgit2/libgit2/issues/3711"},"comments":{"href":"https://api.github.com/repos/libgit2/libgit2/issues/3711/comments"},"review_comments":{"href":"https://api.github.com/repos/libgit2/libgit2/pulls/3711/comments"},"review_comment":{"href":"https://api.github.com/repos/libgit2/libgit2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libgit2/libgit2/pulls/3711/commits"},"statuses":{"href":"https://api.github.com/repos/libgit2/libgit2/statuses/42b595b4630d3b91f1230296f9ee638d8aaf7211"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":71,"deletions":1,"changed_files":3}}