{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/pulls/comments/65419899","id":65419899,"diff_hunk":"@@ -108,26 +131,47 @@ function install_brew()\n     end\n end\n \n-function update()\n-    Git.run(`fetch origin`, dir=brew_prefix)\n-    Git.run(`reset --hard origin/$BREW_BRANCH`, dir=brew_prefix)\n-\n-    # Find all namespaces inside <prefix>/Library/Taps, then search for taps\n-    tapsdir = joinpath(brew_prefix,\"Library\",\"Taps\")\n-    namespaces = readdir(tapsdir)\n-    ns_taps = [[joinpath(tapsdir, ns, tap) for tap in readdir(joinpath(tapsdir, ns))] for ns in namespaces]\n-    taps = vcat(ns_taps...)\n-\n-    # Update each tap, one after another\n-    for tap in taps\n-        println(\"Updating tap $(basename(tap))\")\n-        Git.run(`fetch origin`, dir=tap)\n-        TAP_BRANCH = Git.readchomp(`rev-parse --abbrev-ref HEAD`, dir=tap)\n-        Git.run(`reset --hard origin/$TAP_BRANCH`, dir=tap)\n-    end\n+if VERSION < v\"0.5.0-dev+522\"\n+    function update()\n+        Git.run(`fetch origin`, dir=brew_prefix)\n+        Git.run(`reset --hard origin/$BREW_BRANCH`, dir=brew_prefix)\n+\n+        # Find all namespaces inside <prefix>/Library/Taps, then search for taps\n+        tapsdir = joinpath(brew_prefix,\"Library\",\"Taps\")\n+        namespaces = readdir(tapsdir)\n+        ns_taps = [[joinpath(tapsdir, ns, tap) for tap in readdir(joinpath(tapsdir, ns))] for ns in namespaces]\n+        taps = vcat(ns_taps...)\n+\n+        # Update each tap, one after another\n+        for tap in taps\n+            println(\"Updating tap $(basename(tap))\")\n+            Git.run(`fetch origin`, dir=tap)\n+            TAP_BRANCH = Git.readchomp(`rev-parse --abbrev-ref HEAD`, dir=tap)\n+            Git.run(`reset --hard origin/$TAP_BRANCH`, dir=tap)\n+        end\n \n-    # Finally, upgrade outdated packages.\n-    upgrade()\n+        # Finally, upgrade outdated packages.\n+        upgrade()\n+    end\n+else\n+    function update()\n+        repo = LibGit2.GitRepo(brew_prefix)\n+        remote = LibGit2.get(LibGit2.GitRemote, repo, \"origin\")\n+        \n+        tapsdir = joinpath(brew_prefix,\"Library\",\"Taps\")\n+        namespaces = readdir(tapsdir)\n+        ns_taps = [[joinpath(tapsdir, ns, tap) for tap in readdir(joinpath(tapsdir, ns))] for ns in namespaces]\n+        taps = vcat(ns_taps...)\n+\n+        # Update each tap, one after another\n+        for tap in taps\n+            println(\"Updating tap $(basename(tap))\")\n+            LibGit2.fetch(remote,[BREW_BRANCH])","path":"src/Homebrew.jl","position":120,"original_position":120,"commit_id":"1cacdce2d8c14237d44c2e8b777b712b48ca291c","original_commit_id":"1cacdce2d8c14237d44c2e8b777b712b48ca291c","user":{"login":"staticfloat","id":130920,"avatar_url":"https://avatars.githubusercontent.com/u/130920?v=3","gravatar_id":"","url":"https://api.github.com/users/staticfloat","html_url":"https://github.com/staticfloat","followers_url":"https://api.github.com/users/staticfloat/followers","following_url":"https://api.github.com/users/staticfloat/following{/other_user}","gists_url":"https://api.github.com/users/staticfloat/gists{/gist_id}","starred_url":"https://api.github.com/users/staticfloat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staticfloat/subscriptions","organizations_url":"https://api.github.com/users/staticfloat/orgs","repos_url":"https://api.github.com/users/staticfloat/repos","events_url":"https://api.github.com/users/staticfloat/events{/privacy}","received_events_url":"https://api.github.com/users/staticfloat/received_events","type":"User","site_admin":false},"body":"I'm not positive.  I'd have to check a from-scratch OSX install.","created_at":"2016-06-01T18:47:27Z","updated_at":"2016-06-01T18:47:27Z","html_url":"https://github.com/JuliaLang/Homebrew.jl/pull/106#discussion_r65419899","pull_request_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/pulls/106","_links":{"self":{"href":"https://api.github.com/repos/JuliaLang/Homebrew.jl/pulls/comments/65419899"},"html":{"href":"https://github.com/JuliaLang/Homebrew.jl/pull/106#discussion_r65419899"},"pull_request":{"href":"https://api.github.com/repos/JuliaLang/Homebrew.jl/pulls/106"}}},"pull_request":{"url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/pulls/106","id":64977983,"html_url":"https://github.com/JuliaLang/Homebrew.jl/pull/106","diff_url":"https://github.com/JuliaLang/Homebrew.jl/pull/106.diff","patch_url":"https://github.com/JuliaLang/Homebrew.jl/pull/106.patch","issue_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/issues/106","number":106,"state":"closed","locked":false,"title":"[RFC] Added libgit2 usage instead of Base.Git for new enough julia","user":{"login":"kshyatt","id":828643,"avatar_url":"https://avatars.githubusercontent.com/u/828643?v=3","gravatar_id":"","url":"https://api.github.com/users/kshyatt","html_url":"https://github.com/kshyatt","followers_url":"https://api.github.com/users/kshyatt/followers","following_url":"https://api.github.com/users/kshyatt/following{/other_user}","gists_url":"https://api.github.com/users/kshyatt/gists{/gist_id}","starred_url":"https://api.github.com/users/kshyatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kshyatt/subscriptions","organizations_url":"https://api.github.com/users/kshyatt/orgs","repos_url":"https://api.github.com/users/kshyatt/repos","events_url":"https://api.github.com/users/kshyatt/events{/privacy}","received_events_url":"https://api.github.com/users/kshyatt/received_events","type":"User","site_admin":false},"body":"@tkelman suggested this. What does everyone think? I'm sure I've probably done some stuff wrong so be vicious!","created_at":"2016-04-01T17:29:12Z","updated_at":"2016-06-01T18:47:27Z","closed_at":"2016-04-01T22:10:01Z","merged_at":"2016-04-01T22:10:01Z","merge_commit_sha":"33d0db6c0b57d50b6abe451044ecd2eafa58c7ca","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/pulls/106/commits","review_comments_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/pulls/106/comments","review_comment_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/issues/106/comments","statuses_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/statuses/1cacdce2d8c14237d44c2e8b777b712b48ca291c","head":{"label":"JuliaLang:ksh/libgit2","ref":"ksh/libgit2","sha":"1cacdce2d8c14237d44c2e8b777b712b48ca291c","user":{"login":"JuliaLang","id":743164,"avatar_url":"https://avatars.githubusercontent.com/u/743164?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"repo":{"id":12438391,"name":"Homebrew.jl","full_name":"JuliaLang/Homebrew.jl","owner":{"login":"JuliaLang","id":743164,"avatar_url":"https://avatars.githubusercontent.com/u/743164?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaLang/Homebrew.jl","description":"OSX Binary dependency provider for Julia","fork":false,"url":"https://api.github.com/repos/JuliaLang/Homebrew.jl","forks_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/forks","keys_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/teams","hooks_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/events","assignees_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/tags","blobs_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/subscription","commits_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/merges","archive_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/downloads","issues_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/deployments","created_at":"2013-08-28T16:08:37Z","updated_at":"2016-03-26T21:25:16Z","pushed_at":"2016-05-31T12:06:56Z","git_url":"git://github.com/JuliaLang/Homebrew.jl.git","ssh_url":"git@github.com:JuliaLang/Homebrew.jl.git","clone_url":"https://github.com/JuliaLang/Homebrew.jl.git","svn_url":"https://github.com/JuliaLang/Homebrew.jl","homepage":null,"size":76,"stargazers_count":7,"watchers_count":7,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":11,"forks":11,"open_issues":11,"watchers":7,"default_branch":"master"}},"base":{"label":"JuliaLang:master","ref":"master","sha":"9e1d59f2d401cd4b872623a69a0cc5749715307e","user":{"login":"JuliaLang","id":743164,"avatar_url":"https://avatars.githubusercontent.com/u/743164?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"repo":{"id":12438391,"name":"Homebrew.jl","full_name":"JuliaLang/Homebrew.jl","owner":{"login":"JuliaLang","id":743164,"avatar_url":"https://avatars.githubusercontent.com/u/743164?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaLang","html_url":"https://github.com/JuliaLang","followers_url":"https://api.github.com/users/JuliaLang/followers","following_url":"https://api.github.com/users/JuliaLang/following{/other_user}","gists_url":"https://api.github.com/users/JuliaLang/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaLang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaLang/subscriptions","organizations_url":"https://api.github.com/users/JuliaLang/orgs","repos_url":"https://api.github.com/users/JuliaLang/repos","events_url":"https://api.github.com/users/JuliaLang/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaLang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaLang/Homebrew.jl","description":"OSX Binary dependency provider for Julia","fork":false,"url":"https://api.github.com/repos/JuliaLang/Homebrew.jl","forks_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/forks","keys_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/teams","hooks_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/events","assignees_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/tags","blobs_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/subscription","commits_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/merges","archive_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/downloads","issues_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaLang/Homebrew.jl/deployments","created_at":"2013-08-28T16:08:37Z","updated_at":"2016-03-26T21:25:16Z","pushed_at":"2016-05-31T12:06:56Z","git_url":"git://github.com/JuliaLang/Homebrew.jl.git","ssh_url":"git@github.com:JuliaLang/Homebrew.jl.git","clone_url":"https://github.com/JuliaLang/Homebrew.jl.git","svn_url":"https://github.com/JuliaLang/Homebrew.jl","homepage":null,"size":76,"stargazers_count":7,"watchers_count":7,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":11,"forks":11,"open_issues":11,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaLang/Homebrew.jl/pulls/106"},"html":{"href":"https://github.com/JuliaLang/Homebrew.jl/pull/106"},"issue":{"href":"https://api.github.com/repos/JuliaLang/Homebrew.jl/issues/106"},"comments":{"href":"https://api.github.com/repos/JuliaLang/Homebrew.jl/issues/106/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaLang/Homebrew.jl/pulls/106/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaLang/Homebrew.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaLang/Homebrew.jl/pulls/106/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaLang/Homebrew.jl/statuses/1cacdce2d8c14237d44c2e8b777b712b48ca291c"}}}}
{"actor":{"display_login":"staticfloat"}}