{"action":"created","comment":{"url":"https://api.github.com/repos/github/git-lfs/pulls/comments/33960676","id":33960676,"diff_hunk":"@@ -38,3 +47,41 @@ func sshAuthenticate(endpoint Endpoint, operation, oid string) (sshAuthResponse,\n \n \treturn res, err\n }\n+\n+// Return the executable name for ssh on this machine and the base args\n+// Base args includes port settings, user/host, everything pre the command to execute\n+func sshGetExeAndArgs(endpoint Endpoint) (exe string, baseargs []string) {\n+\tif len(endpoint.SshUserAndHost) == 0 {\n+\t\treturn \"\", nil\n+\t}\n+\n+\tssh := Config.Getenv(\"GIT_SSH\")\n+\tbasessh := filepath.Base(ssh)\n+\t// Strip extension for easier comparison\n+\tif ext := filepath.Ext(basessh); len(ext) > 0 {\n+\t\tbasessh = basessh[:len(basessh)-len(ext)]\n+\t}\n+\tisPlink := strings.EqualFold(basessh, \"plink\")\n+\tisTortoise := strings.EqualFold(basessh, \"tortoiseplink\")\n+\tif ssh == \"\" {\n+\t\tssh = \"ssh\"\n+\t}","path":"lfs/ssh.go","position":60,"original_position":60,"commit_id":"28929785fe63921f1889cf3225cbce3c74e520f0","original_commit_id":"a91e1ebb811e00edbf04efa467feb9ed5c866f49","user":{"login":"technoweenie","id":21,"avatar_url":"https://avatars.githubusercontent.com/u/21?v=3","gravatar_id":"","url":"https://api.github.com/users/technoweenie","html_url":"https://github.com/technoweenie","followers_url":"https://api.github.com/users/technoweenie/followers","following_url":"https://api.github.com/users/technoweenie/following{/other_user}","gists_url":"https://api.github.com/users/technoweenie/gists{/gist_id}","starred_url":"https://api.github.com/users/technoweenie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/technoweenie/subscriptions","organizations_url":"https://api.github.com/users/technoweenie/orgs","repos_url":"https://api.github.com/users/technoweenie/repos","events_url":"https://api.github.com/users/technoweenie/events{/privacy}","received_events_url":"https://api.github.com/users/technoweenie/received_events","type":"User","site_admin":true},"body":"I like it. I think the workflow is clearer. @sinbad: Thoughts? I can just make this change after merging.","created_at":"2015-07-06T17:40:37Z","updated_at":"2015-07-06T17:40:37Z","html_url":"https://github.com/github/git-lfs/pull/404#discussion_r33960676","pull_request_url":"https://api.github.com/repos/github/git-lfs/pulls/404","_links":{"self":{"href":"https://api.github.com/repos/github/git-lfs/pulls/comments/33960676"},"html":{"href":"https://github.com/github/git-lfs/pull/404#discussion_r33960676"},"pull_request":{"href":"https://api.github.com/repos/github/git-lfs/pulls/404"}}},"pull_request":{"url":"https://api.github.com/repos/github/git-lfs/pulls/404","id":37885722,"html_url":"https://github.com/github/git-lfs/pull/404","diff_url":"https://github.com/github/git-lfs/pull/404.diff","patch_url":"https://github.com/github/git-lfs/pull/404.patch","issue_url":"https://api.github.com/repos/github/git-lfs/issues/404","number":404,"state":"open","locked":false,"title":"Improved SSH support: non-bare urls, custom ports, and GIT_SSH/plink","user":{"login":"sinbad","id":142735,"avatar_url":"https://avatars.githubusercontent.com/u/142735?v=3","gravatar_id":"","url":"https://api.github.com/users/sinbad","html_url":"https://github.com/sinbad","followers_url":"https://api.github.com/users/sinbad/followers","following_url":"https://api.github.com/users/sinbad/following{/other_user}","gists_url":"https://api.github.com/users/sinbad/gists{/gist_id}","starred_url":"https://api.github.com/users/sinbad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinbad/subscriptions","organizations_url":"https://api.github.com/users/sinbad/orgs","repos_url":"https://api.github.com/users/sinbad/repos","events_url":"https://api.github.com/users/sinbad/events{/privacy}","received_events_url":"https://api.github.com/users/sinbad/received_events","type":"User","site_admin":false},"body":"* Full SSH urls e.g. ssh://user@host/repo\r\n* Custom ports in both bare and full urls\r\n* GIT_SSH environment for alternate ssh clients\r\n* Explicit support for plink.exe and TortoisePlink.exe\r\n\r\nDepends on https://github.com/github/git-lfs/pull/403 (included in PR)","created_at":"2015-06-17T10:23:14Z","updated_at":"2015-07-06T17:40:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f51c9adb5df27530c682055d14b061d23d99b569","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/github/git-lfs/pulls/404/commits","review_comments_url":"https://api.github.com/repos/github/git-lfs/pulls/404/comments","review_comment_url":"https://api.github.com/repos/github/git-lfs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/github/git-lfs/issues/404/comments","statuses_url":"https://api.github.com/repos/github/git-lfs/statuses/28929785fe63921f1889cf3225cbce3c74e520f0","head":{"label":"sinbad:ssh_urls","ref":"ssh_urls","sha":"28929785fe63921f1889cf3225cbce3c74e520f0","user":{"login":"sinbad","id":142735,"avatar_url":"https://avatars.githubusercontent.com/u/142735?v=3","gravatar_id":"","url":"https://api.github.com/users/sinbad","html_url":"https://github.com/sinbad","followers_url":"https://api.github.com/users/sinbad/followers","following_url":"https://api.github.com/users/sinbad/following{/other_user}","gists_url":"https://api.github.com/users/sinbad/gists{/gist_id}","starred_url":"https://api.github.com/users/sinbad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinbad/subscriptions","organizations_url":"https://api.github.com/users/sinbad/orgs","repos_url":"https://api.github.com/users/sinbad/repos","events_url":"https://api.github.com/users/sinbad/events{/privacy}","received_events_url":"https://api.github.com/users/sinbad/received_events","type":"User","site_admin":false},"repo":{"id":35943098,"name":"git-lfs","full_name":"sinbad/git-lfs","owner":{"login":"sinbad","id":142735,"avatar_url":"https://avatars.githubusercontent.com/u/142735?v=3","gravatar_id":"","url":"https://api.github.com/users/sinbad","html_url":"https://github.com/sinbad","followers_url":"https://api.github.com/users/sinbad/followers","following_url":"https://api.github.com/users/sinbad/following{/other_user}","gists_url":"https://api.github.com/users/sinbad/gists{/gist_id}","starred_url":"https://api.github.com/users/sinbad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinbad/subscriptions","organizations_url":"https://api.github.com/users/sinbad/orgs","repos_url":"https://api.github.com/users/sinbad/repos","events_url":"https://api.github.com/users/sinbad/events{/privacy}","received_events_url":"https://api.github.com/users/sinbad/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sinbad/git-lfs","description":"Git extension for versioning large files","fork":true,"url":"https://api.github.com/repos/sinbad/git-lfs","forks_url":"https://api.github.com/repos/sinbad/git-lfs/forks","keys_url":"https://api.github.com/repos/sinbad/git-lfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sinbad/git-lfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sinbad/git-lfs/teams","hooks_url":"https://api.github.com/repos/sinbad/git-lfs/hooks","issue_events_url":"https://api.github.com/repos/sinbad/git-lfs/issues/events{/number}","events_url":"https://api.github.com/repos/sinbad/git-lfs/events","assignees_url":"https://api.github.com/repos/sinbad/git-lfs/assignees{/user}","branches_url":"https://api.github.com/repos/sinbad/git-lfs/branches{/branch}","tags_url":"https://api.github.com/repos/sinbad/git-lfs/tags","blobs_url":"https://api.github.com/repos/sinbad/git-lfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sinbad/git-lfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sinbad/git-lfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/sinbad/git-lfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sinbad/git-lfs/statuses/{sha}","languages_url":"https://api.github.com/repos/sinbad/git-lfs/languages","stargazers_url":"https://api.github.com/repos/sinbad/git-lfs/stargazers","contributors_url":"https://api.github.com/repos/sinbad/git-lfs/contributors","subscribers_url":"https://api.github.com/repos/sinbad/git-lfs/subscribers","subscription_url":"https://api.github.com/repos/sinbad/git-lfs/subscription","commits_url":"https://api.github.com/repos/sinbad/git-lfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/sinbad/git-lfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/sinbad/git-lfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/sinbad/git-lfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/sinbad/git-lfs/contents/{+path}","compare_url":"https://api.github.com/repos/sinbad/git-lfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sinbad/git-lfs/merges","archive_url":"https://api.github.com/repos/sinbad/git-lfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sinbad/git-lfs/downloads","issues_url":"https://api.github.com/repos/sinbad/git-lfs/issues{/number}","pulls_url":"https://api.github.com/repos/sinbad/git-lfs/pulls{/number}","milestones_url":"https://api.github.com/repos/sinbad/git-lfs/milestones{/number}","notifications_url":"https://api.github.com/repos/sinbad/git-lfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sinbad/git-lfs/labels{/name}","releases_url":"https://api.github.com/repos/sinbad/git-lfs/releases{/id}","created_at":"2015-05-20T11:08:57Z","updated_at":"2015-05-20T11:08:58Z","pushed_at":"2015-06-29T11:57:57Z","git_url":"git://github.com/sinbad/git-lfs.git","ssh_url":"git@github.com:sinbad/git-lfs.git","clone_url":"https://github.com/sinbad/git-lfs.git","svn_url":"https://github.com/sinbad/git-lfs","homepage":"https://git-lfs.github.com","size":3750,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"github:master","ref":"master","sha":"b351a8bf6cec53b520213f47d37693fc4c096e69","user":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"repo":{"id":13021798,"name":"git-lfs","full_name":"github/git-lfs","owner":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/github/git-lfs","description":"Git extension for versioning large files","fork":false,"url":"https://api.github.com/repos/github/git-lfs","forks_url":"https://api.github.com/repos/github/git-lfs/forks","keys_url":"https://api.github.com/repos/github/git-lfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/github/git-lfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/github/git-lfs/teams","hooks_url":"https://api.github.com/repos/github/git-lfs/hooks","issue_events_url":"https://api.github.com/repos/github/git-lfs/issues/events{/number}","events_url":"https://api.github.com/repos/github/git-lfs/events","assignees_url":"https://api.github.com/repos/github/git-lfs/assignees{/user}","branches_url":"https://api.github.com/repos/github/git-lfs/branches{/branch}","tags_url":"https://api.github.com/repos/github/git-lfs/tags","blobs_url":"https://api.github.com/repos/github/git-lfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/github/git-lfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/github/git-lfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/github/git-lfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/github/git-lfs/statuses/{sha}","languages_url":"https://api.github.com/repos/github/git-lfs/languages","stargazers_url":"https://api.github.com/repos/github/git-lfs/stargazers","contributors_url":"https://api.github.com/repos/github/git-lfs/contributors","subscribers_url":"https://api.github.com/repos/github/git-lfs/subscribers","subscription_url":"https://api.github.com/repos/github/git-lfs/subscription","commits_url":"https://api.github.com/repos/github/git-lfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/github/git-lfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/github/git-lfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/github/git-lfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/github/git-lfs/contents/{+path}","compare_url":"https://api.github.com/repos/github/git-lfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/github/git-lfs/merges","archive_url":"https://api.github.com/repos/github/git-lfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/github/git-lfs/downloads","issues_url":"https://api.github.com/repos/github/git-lfs/issues{/number}","pulls_url":"https://api.github.com/repos/github/git-lfs/pulls{/number}","milestones_url":"https://api.github.com/repos/github/git-lfs/milestones{/number}","notifications_url":"https://api.github.com/repos/github/git-lfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/github/git-lfs/labels{/name}","releases_url":"https://api.github.com/repos/github/git-lfs/releases{/id}","created_at":"2013-09-22T22:03:28Z","updated_at":"2015-07-06T15:21:06Z","pushed_at":"2015-07-06T17:33:35Z","git_url":"git://github.com/github/git-lfs.git","ssh_url":"git@github.com:github/git-lfs.git","clone_url":"https://github.com/github/git-lfs.git","svn_url":"https://github.com/github/git-lfs","homepage":"https://git-lfs.github.com","size":8811,"stargazers_count":2102,"watchers_count":2102,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":133,"mirror_url":null,"open_issues_count":90,"forks":133,"open_issues":90,"watchers":2102,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/github/git-lfs/pulls/404"},"html":{"href":"https://github.com/github/git-lfs/pull/404"},"issue":{"href":"https://api.github.com/repos/github/git-lfs/issues/404"},"comments":{"href":"https://api.github.com/repos/github/git-lfs/issues/404/comments"},"review_comments":{"href":"https://api.github.com/repos/github/git-lfs/pulls/404/comments"},"review_comment":{"href":"https://api.github.com/repos/github/git-lfs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/github/git-lfs/pulls/404/commits"},"statuses":{"href":"https://api.github.com/repos/github/git-lfs/statuses/28929785fe63921f1889cf3225cbce3c74e520f0"}}}}