{"action":"created","comment":{"url":"https://api.github.com/repos/keplerproject/luarocks/pulls/comments/48232938","id":48232938,"diff_hunk":"@@ -0,0 +1,33 @@\n+\n+--- Fetch back-end for retrieving sources from Git repositories\n+-- that use ssh:// transport. For example, for fetching a repository\n+-- that requires the following command line:\n+-- `git clone ssh://git@example.com/path/foo.git\n+-- you can use this in the rockspec:\n+-- source = { url = \"git+ssh://git@example.com/path/foo.git\" }\n+-- It also handles scp-style ssh urls: git@example.com:path/foo.git,\n+-- but you have to prepend the \"git+ssh://\" and why not use the \"newer\"\n+-- style anyway?\n+local git_ssh = {}\n+\n+local git = require(\"luarocks.fetch.git\")\n+\n+--- Fetch sources for building a rock from a local Git repository.\n+-- @param rockspec table: The rockspec table\n+-- @param extract boolean: Unused in this module (required for API purposes.)\n+-- @param dest_dir string or nil: If set, will extract to the given directory.\n+-- @return (string, string) or (nil, string): The absolute pathname of\n+-- the fetched source tarball and the temporary directory created to\n+-- store it; or nil and an error message.\n+function git_ssh.get_sources(rockspec, extract, dest_dir)\n+   rockspec.source.url = rockspec.source.url:gsub(\"^git.\", \"\")\n+\n+   -- Handle old-style scp-like git ssh urls\n+   if rockspec.source.url:match(\"ssh://[^/]+:[^%d]\") then","path":"src/luarocks/fetch/git_ssh.lua","position":26,"original_position":26,"commit_id":"cc5da6bd6ec7d4dc5e0e7baf1aba3f04370aef37","original_commit_id":"cc5da6bd6ec7d4dc5e0e7baf1aba3f04370aef37","user":{"login":"siffiejoe","id":930147,"avatar_url":"https://avatars.githubusercontent.com/u/930147?v=3","gravatar_id":"","url":"https://api.github.com/users/siffiejoe","html_url":"https://github.com/siffiejoe","followers_url":"https://api.github.com/users/siffiejoe/followers","following_url":"https://api.github.com/users/siffiejoe/following{/other_user}","gists_url":"https://api.github.com/users/siffiejoe/gists{/gist_id}","starred_url":"https://api.github.com/users/siffiejoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siffiejoe/subscriptions","organizations_url":"https://api.github.com/users/siffiejoe/orgs","repos_url":"https://api.github.com/users/siffiejoe/repos","events_url":"https://api.github.com/users/siffiejoe/events{/privacy}","received_events_url":"https://api.github.com/users/siffiejoe/received_events","type":"User","site_admin":false},"body":"Maybe you should anchor (`^`) the pattern here as well ...","created_at":"2015-12-22T08:55:31Z","updated_at":"2015-12-22T08:55:31Z","html_url":"https://github.com/keplerproject/luarocks/pull/469#discussion_r48232938","pull_request_url":"https://api.github.com/repos/keplerproject/luarocks/pulls/469","_links":{"self":{"href":"https://api.github.com/repos/keplerproject/luarocks/pulls/comments/48232938"},"html":{"href":"https://github.com/keplerproject/luarocks/pull/469#discussion_r48232938"},"pull_request":{"href":"https://api.github.com/repos/keplerproject/luarocks/pulls/469"}}},"pull_request":{"url":"https://api.github.com/repos/keplerproject/luarocks/pulls/469","id":54322648,"html_url":"https://github.com/keplerproject/luarocks/pull/469","diff_url":"https://github.com/keplerproject/luarocks/pull/469.diff","patch_url":"https://github.com/keplerproject/luarocks/pull/469.patch","issue_url":"https://api.github.com/repos/keplerproject/luarocks/issues/469","number":469,"state":"open","locked":false,"title":"Add git+ssh support to the fetchers.","user":{"login":"geoffleyland","id":691516,"avatar_url":"https://avatars.githubusercontent.com/u/691516?v=3","gravatar_id":"","url":"https://api.github.com/users/geoffleyland","html_url":"https://github.com/geoffleyland","followers_url":"https://api.github.com/users/geoffleyland/followers","following_url":"https://api.github.com/users/geoffleyland/following{/other_user}","gists_url":"https://api.github.com/users/geoffleyland/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffleyland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffleyland/subscriptions","organizations_url":"https://api.github.com/users/geoffleyland/orgs","repos_url":"https://api.github.com/users/geoffleyland/repos","events_url":"https://api.github.com/users/geoffleyland/events{/privacy}","received_events_url":"https://api.github.com/users/geoffleyland/received_events","type":"User","site_admin":false},"body":"This adds support for git+ssh, which is used for authenticated repo access by at least Github and bitbucket.  I'm not sure master is the right place to put this, but since it adds functionality rather than modifies it, I figure it's non-breaking?","created_at":"2015-12-22T01:17:42Z","updated_at":"2015-12-22T08:55:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c149b3a21d7074117d7fd2a955ff6a791489436","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/keplerproject/luarocks/pulls/469/commits","review_comments_url":"https://api.github.com/repos/keplerproject/luarocks/pulls/469/comments","review_comment_url":"https://api.github.com/repos/keplerproject/luarocks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keplerproject/luarocks/issues/469/comments","statuses_url":"https://api.github.com/repos/keplerproject/luarocks/statuses/cc5da6bd6ec7d4dc5e0e7baf1aba3f04370aef37","head":{"label":"geoffleyland:master","ref":"master","sha":"cc5da6bd6ec7d4dc5e0e7baf1aba3f04370aef37","user":{"login":"geoffleyland","id":691516,"avatar_url":"https://avatars.githubusercontent.com/u/691516?v=3","gravatar_id":"","url":"https://api.github.com/users/geoffleyland","html_url":"https://github.com/geoffleyland","followers_url":"https://api.github.com/users/geoffleyland/followers","following_url":"https://api.github.com/users/geoffleyland/following{/other_user}","gists_url":"https://api.github.com/users/geoffleyland/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffleyland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffleyland/subscriptions","organizations_url":"https://api.github.com/users/geoffleyland/orgs","repos_url":"https://api.github.com/users/geoffleyland/repos","events_url":"https://api.github.com/users/geoffleyland/events{/privacy}","received_events_url":"https://api.github.com/users/geoffleyland/received_events","type":"User","site_admin":false},"repo":{"id":48402541,"name":"luarocks","full_name":"geoffleyland/luarocks","owner":{"login":"geoffleyland","id":691516,"avatar_url":"https://avatars.githubusercontent.com/u/691516?v=3","gravatar_id":"","url":"https://api.github.com/users/geoffleyland","html_url":"https://github.com/geoffleyland","followers_url":"https://api.github.com/users/geoffleyland/followers","following_url":"https://api.github.com/users/geoffleyland/following{/other_user}","gists_url":"https://api.github.com/users/geoffleyland/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffleyland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffleyland/subscriptions","organizations_url":"https://api.github.com/users/geoffleyland/orgs","repos_url":"https://api.github.com/users/geoffleyland/repos","events_url":"https://api.github.com/users/geoffleyland/events{/privacy}","received_events_url":"https://api.github.com/users/geoffleyland/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/geoffleyland/luarocks","description":"LuaRocks is  a deployment and management system for Lua modules.","fork":true,"url":"https://api.github.com/repos/geoffleyland/luarocks","forks_url":"https://api.github.com/repos/geoffleyland/luarocks/forks","keys_url":"https://api.github.com/repos/geoffleyland/luarocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geoffleyland/luarocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geoffleyland/luarocks/teams","hooks_url":"https://api.github.com/repos/geoffleyland/luarocks/hooks","issue_events_url":"https://api.github.com/repos/geoffleyland/luarocks/issues/events{/number}","events_url":"https://api.github.com/repos/geoffleyland/luarocks/events","assignees_url":"https://api.github.com/repos/geoffleyland/luarocks/assignees{/user}","branches_url":"https://api.github.com/repos/geoffleyland/luarocks/branches{/branch}","tags_url":"https://api.github.com/repos/geoffleyland/luarocks/tags","blobs_url":"https://api.github.com/repos/geoffleyland/luarocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geoffleyland/luarocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geoffleyland/luarocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/geoffleyland/luarocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geoffleyland/luarocks/statuses/{sha}","languages_url":"https://api.github.com/repos/geoffleyland/luarocks/languages","stargazers_url":"https://api.github.com/repos/geoffleyland/luarocks/stargazers","contributors_url":"https://api.github.com/repos/geoffleyland/luarocks/contributors","subscribers_url":"https://api.github.com/repos/geoffleyland/luarocks/subscribers","subscription_url":"https://api.github.com/repos/geoffleyland/luarocks/subscription","commits_url":"https://api.github.com/repos/geoffleyland/luarocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/geoffleyland/luarocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/geoffleyland/luarocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/geoffleyland/luarocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/geoffleyland/luarocks/contents/{+path}","compare_url":"https://api.github.com/repos/geoffleyland/luarocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geoffleyland/luarocks/merges","archive_url":"https://api.github.com/repos/geoffleyland/luarocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geoffleyland/luarocks/downloads","issues_url":"https://api.github.com/repos/geoffleyland/luarocks/issues{/number}","pulls_url":"https://api.github.com/repos/geoffleyland/luarocks/pulls{/number}","milestones_url":"https://api.github.com/repos/geoffleyland/luarocks/milestones{/number}","notifications_url":"https://api.github.com/repos/geoffleyland/luarocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geoffleyland/luarocks/labels{/name}","releases_url":"https://api.github.com/repos/geoffleyland/luarocks/releases{/id}","created_at":"2015-12-22T01:07:20Z","updated_at":"2015-12-22T01:07:21Z","pushed_at":"2015-12-22T02:32:44Z","git_url":"git://github.com/geoffleyland/luarocks.git","ssh_url":"git@github.com:geoffleyland/luarocks.git","clone_url":"https://github.com/geoffleyland/luarocks.git","svn_url":"https://github.com/geoffleyland/luarocks","homepage":"http://www.luarocks.org","size":21507,"stargazers_count":0,"watchers_count":0,"language":"Lua","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"keplerproject:master","ref":"master","sha":"fbe0915c8e5a59267decde4a538145ae62fb5869","user":{"login":"keplerproject","id":129602,"avatar_url":"https://avatars.githubusercontent.com/u/129602?v=3","gravatar_id":"","url":"https://api.github.com/users/keplerproject","html_url":"https://github.com/keplerproject","followers_url":"https://api.github.com/users/keplerproject/followers","following_url":"https://api.github.com/users/keplerproject/following{/other_user}","gists_url":"https://api.github.com/users/keplerproject/gists{/gist_id}","starred_url":"https://api.github.com/users/keplerproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keplerproject/subscriptions","organizations_url":"https://api.github.com/users/keplerproject/orgs","repos_url":"https://api.github.com/users/keplerproject/repos","events_url":"https://api.github.com/users/keplerproject/events{/privacy}","received_events_url":"https://api.github.com/users/keplerproject/received_events","type":"Organization","site_admin":false},"repo":{"id":571621,"name":"luarocks","full_name":"keplerproject/luarocks","owner":{"login":"keplerproject","id":129602,"avatar_url":"https://avatars.githubusercontent.com/u/129602?v=3","gravatar_id":"","url":"https://api.github.com/users/keplerproject","html_url":"https://github.com/keplerproject","followers_url":"https://api.github.com/users/keplerproject/followers","following_url":"https://api.github.com/users/keplerproject/following{/other_user}","gists_url":"https://api.github.com/users/keplerproject/gists{/gist_id}","starred_url":"https://api.github.com/users/keplerproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keplerproject/subscriptions","organizations_url":"https://api.github.com/users/keplerproject/orgs","repos_url":"https://api.github.com/users/keplerproject/repos","events_url":"https://api.github.com/users/keplerproject/events{/privacy}","received_events_url":"https://api.github.com/users/keplerproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keplerproject/luarocks","description":"LuaRocks is  a deployment and management system for Lua modules.","fork":false,"url":"https://api.github.com/repos/keplerproject/luarocks","forks_url":"https://api.github.com/repos/keplerproject/luarocks/forks","keys_url":"https://api.github.com/repos/keplerproject/luarocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keplerproject/luarocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keplerproject/luarocks/teams","hooks_url":"https://api.github.com/repos/keplerproject/luarocks/hooks","issue_events_url":"https://api.github.com/repos/keplerproject/luarocks/issues/events{/number}","events_url":"https://api.github.com/repos/keplerproject/luarocks/events","assignees_url":"https://api.github.com/repos/keplerproject/luarocks/assignees{/user}","branches_url":"https://api.github.com/repos/keplerproject/luarocks/branches{/branch}","tags_url":"https://api.github.com/repos/keplerproject/luarocks/tags","blobs_url":"https://api.github.com/repos/keplerproject/luarocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keplerproject/luarocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keplerproject/luarocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/keplerproject/luarocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keplerproject/luarocks/statuses/{sha}","languages_url":"https://api.github.com/repos/keplerproject/luarocks/languages","stargazers_url":"https://api.github.com/repos/keplerproject/luarocks/stargazers","contributors_url":"https://api.github.com/repos/keplerproject/luarocks/contributors","subscribers_url":"https://api.github.com/repos/keplerproject/luarocks/subscribers","subscription_url":"https://api.github.com/repos/keplerproject/luarocks/subscription","commits_url":"https://api.github.com/repos/keplerproject/luarocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/keplerproject/luarocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/keplerproject/luarocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/keplerproject/luarocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/keplerproject/luarocks/contents/{+path}","compare_url":"https://api.github.com/repos/keplerproject/luarocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keplerproject/luarocks/merges","archive_url":"https://api.github.com/repos/keplerproject/luarocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keplerproject/luarocks/downloads","issues_url":"https://api.github.com/repos/keplerproject/luarocks/issues{/number}","pulls_url":"https://api.github.com/repos/keplerproject/luarocks/pulls{/number}","milestones_url":"https://api.github.com/repos/keplerproject/luarocks/milestones{/number}","notifications_url":"https://api.github.com/repos/keplerproject/luarocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keplerproject/luarocks/labels{/name}","releases_url":"https://api.github.com/repos/keplerproject/luarocks/releases{/id}","created_at":"2010-03-20T18:23:35Z","updated_at":"2015-12-20T23:34:01Z","pushed_at":"2015-12-22T02:32:45Z","git_url":"git://github.com/keplerproject/luarocks.git","ssh_url":"git@github.com:keplerproject/luarocks.git","clone_url":"https://github.com/keplerproject/luarocks.git","svn_url":"https://github.com/keplerproject/luarocks","homepage":"http://www.luarocks.org","size":25622,"stargazers_count":480,"watchers_count":480,"language":"Lua","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":116,"mirror_url":null,"open_issues_count":73,"forks":116,"open_issues":73,"watchers":480,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/keplerproject/luarocks/pulls/469"},"html":{"href":"https://github.com/keplerproject/luarocks/pull/469"},"issue":{"href":"https://api.github.com/repos/keplerproject/luarocks/issues/469"},"comments":{"href":"https://api.github.com/repos/keplerproject/luarocks/issues/469/comments"},"review_comments":{"href":"https://api.github.com/repos/keplerproject/luarocks/pulls/469/comments"},"review_comment":{"href":"https://api.github.com/repos/keplerproject/luarocks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keplerproject/luarocks/pulls/469/commits"},"statuses":{"href":"https://api.github.com/repos/keplerproject/luarocks/statuses/cc5da6bd6ec7d4dc5e0e7baf1aba3f04370aef37"}}}}