{"action":"created","comment":{"url":"https://api.github.com/repos/Carthage/Carthage/pulls/comments/58328915","id":58328915,"diff_hunk":"@@ -434,16 +434,24 @@ public func submodulesInRepository(repositoryFileURL: NSURL, revision: String =\n \t\t}\n }\n \n-/// Determines whether any reference exists for the given pattern in the given\n+/// Determines whether a branch exists for the given pattern in the given\n /// repository.\n ///\n /// If the specified file URL does not represent a valid Git repository, `false`\n /// will be sent.\n-internal func referenceExistsInRepository(repositoryFileURL: NSURL, pattern: String) -> SignalProducer<Bool, NoError> {\n+internal func branchExistsInRepository(repositoryFileURL: NSURL, pattern: String) -> SignalProducer<Bool, NoError> {\n \treturn ensureDirectoryExistsAtURL(repositoryFileURL)\n-\t\t.then(launchGitTask([ \"show-ref\", pattern ], repositoryFileURL: repositoryFileURL))\n-\t\t.then(.init(value: true))\n-\t\t.flatMapError { _ in .init(value: false) }\n+\t\t.succeeded()\n+\t\t.flatMap(.Concat) { exists -> SignalProducer<Bool, NoError> in\n+\t\t\tif !exists { return .init(value: false) }\n+\t\t\treturn zip(","path":"Source/CarthageKit/Git.swift","position":19,"original_position":19,"commit_id":"98bcd1f425b3a7aa190e904ff504926b9c99d65f","original_commit_id":"98bcd1f425b3a7aa190e904ff504926b9c99d65f","user":{"login":"ikesyo","id":909674,"avatar_url":"https://avatars.githubusercontent.com/u/909674?v=3","gravatar_id":"","url":"https://api.github.com/users/ikesyo","html_url":"https://github.com/ikesyo","followers_url":"https://api.github.com/users/ikesyo/followers","following_url":"https://api.github.com/users/ikesyo/following{/other_user}","gists_url":"https://api.github.com/users/ikesyo/gists{/gist_id}","starred_url":"https://api.github.com/users/ikesyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikesyo/subscriptions","organizations_url":"https://api.github.com/users/ikesyo/orgs","repos_url":"https://api.github.com/users/ikesyo/repos","events_url":"https://api.github.com/users/ikesyo/events{/privacy}","received_events_url":"https://api.github.com/users/ikesyo/received_events","type":"User","site_admin":false},"body":"How about using only `git show-ref --heads`?","created_at":"2016-04-04T05:12:12Z","updated_at":"2016-04-04T05:12:12Z","html_url":"https://github.com/Carthage/Carthage/pull/1239#discussion_r58328915","pull_request_url":"https://api.github.com/repos/Carthage/Carthage/pulls/1239","_links":{"self":{"href":"https://api.github.com/repos/Carthage/Carthage/pulls/comments/58328915"},"html":{"href":"https://github.com/Carthage/Carthage/pull/1239#discussion_r58328915"},"pull_request":{"href":"https://api.github.com/repos/Carthage/Carthage/pulls/1239"}}},"pull_request":{"url":"https://api.github.com/repos/Carthage/Carthage/pulls/1239","id":65087480,"html_url":"https://github.com/Carthage/Carthage/pull/1239","diff_url":"https://github.com/Carthage/Carthage/pull/1239.diff","patch_url":"https://github.com/Carthage/Carthage/pull/1239.patch","issue_url":"https://api.github.com/repos/Carthage/Carthage/issues/1239","number":1239,"state":"open","locked":false,"title":"Only fetch for branches, not tags","user":{"login":"mdiep","id":1302,"avatar_url":"https://avatars.githubusercontent.com/u/1302?v=3","gravatar_id":"","url":"https://api.github.com/users/mdiep","html_url":"https://github.com/mdiep","followers_url":"https://api.github.com/users/mdiep/followers","following_url":"https://api.github.com/users/mdiep/following{/other_user}","gists_url":"https://api.github.com/users/mdiep/gists{/gist_id}","starred_url":"https://api.github.com/users/mdiep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdiep/subscriptions","organizations_url":"https://api.github.com/users/mdiep/orgs","repos_url":"https://api.github.com/users/mdiep/repos","events_url":"https://api.github.com/users/mdiep/events{/privacy}","received_events_url":"https://api.github.com/users/mdiep/received_events","type":"User","site_admin":false},"body":"Fixes #1237\n\nWe should treat tags as immutable. I should have caught this in code review.","created_at":"2016-04-04T01:18:58Z","updated_at":"2016-04-04T05:12:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"970294acdf08a1de974ef2d924e7bcf23b8c1205","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Carthage/Carthage/pulls/1239/commits","review_comments_url":"https://api.github.com/repos/Carthage/Carthage/pulls/1239/comments","review_comment_url":"https://api.github.com/repos/Carthage/Carthage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Carthage/Carthage/issues/1239/comments","statuses_url":"https://api.github.com/repos/Carthage/Carthage/statuses/98bcd1f425b3a7aa190e904ff504926b9c99d65f","head":{"label":"Carthage:branch-exists-in-repository","ref":"branch-exists-in-repository","sha":"98bcd1f425b3a7aa190e904ff504926b9c99d65f","user":{"login":"Carthage","id":9146792,"avatar_url":"https://avatars.githubusercontent.com/u/9146792?v=3","gravatar_id":"","url":"https://api.github.com/users/Carthage","html_url":"https://github.com/Carthage","followers_url":"https://api.github.com/users/Carthage/followers","following_url":"https://api.github.com/users/Carthage/following{/other_user}","gists_url":"https://api.github.com/users/Carthage/gists{/gist_id}","starred_url":"https://api.github.com/users/Carthage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carthage/subscriptions","organizations_url":"https://api.github.com/users/Carthage/orgs","repos_url":"https://api.github.com/users/Carthage/repos","events_url":"https://api.github.com/users/Carthage/events{/privacy}","received_events_url":"https://api.github.com/users/Carthage/received_events","type":"Organization","site_admin":false},"repo":{"id":25050844,"name":"Carthage","full_name":"Carthage/Carthage","owner":{"login":"Carthage","id":9146792,"avatar_url":"https://avatars.githubusercontent.com/u/9146792?v=3","gravatar_id":"","url":"https://api.github.com/users/Carthage","html_url":"https://github.com/Carthage","followers_url":"https://api.github.com/users/Carthage/followers","following_url":"https://api.github.com/users/Carthage/following{/other_user}","gists_url":"https://api.github.com/users/Carthage/gists{/gist_id}","starred_url":"https://api.github.com/users/Carthage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carthage/subscriptions","organizations_url":"https://api.github.com/users/Carthage/orgs","repos_url":"https://api.github.com/users/Carthage/repos","events_url":"https://api.github.com/users/Carthage/events{/privacy}","received_events_url":"https://api.github.com/users/Carthage/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Carthage/Carthage","description":"A simple, decentralized dependency manager for Cocoa","fork":false,"url":"https://api.github.com/repos/Carthage/Carthage","forks_url":"https://api.github.com/repos/Carthage/Carthage/forks","keys_url":"https://api.github.com/repos/Carthage/Carthage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Carthage/Carthage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Carthage/Carthage/teams","hooks_url":"https://api.github.com/repos/Carthage/Carthage/hooks","issue_events_url":"https://api.github.com/repos/Carthage/Carthage/issues/events{/number}","events_url":"https://api.github.com/repos/Carthage/Carthage/events","assignees_url":"https://api.github.com/repos/Carthage/Carthage/assignees{/user}","branches_url":"https://api.github.com/repos/Carthage/Carthage/branches{/branch}","tags_url":"https://api.github.com/repos/Carthage/Carthage/tags","blobs_url":"https://api.github.com/repos/Carthage/Carthage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Carthage/Carthage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Carthage/Carthage/git/refs{/sha}","trees_url":"https://api.github.com/repos/Carthage/Carthage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Carthage/Carthage/statuses/{sha}","languages_url":"https://api.github.com/repos/Carthage/Carthage/languages","stargazers_url":"https://api.github.com/repos/Carthage/Carthage/stargazers","contributors_url":"https://api.github.com/repos/Carthage/Carthage/contributors","subscribers_url":"https://api.github.com/repos/Carthage/Carthage/subscribers","subscription_url":"https://api.github.com/repos/Carthage/Carthage/subscription","commits_url":"https://api.github.com/repos/Carthage/Carthage/commits{/sha}","git_commits_url":"https://api.github.com/repos/Carthage/Carthage/git/commits{/sha}","comments_url":"https://api.github.com/repos/Carthage/Carthage/comments{/number}","issue_comment_url":"https://api.github.com/repos/Carthage/Carthage/issues/comments{/number}","contents_url":"https://api.github.com/repos/Carthage/Carthage/contents/{+path}","compare_url":"https://api.github.com/repos/Carthage/Carthage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Carthage/Carthage/merges","archive_url":"https://api.github.com/repos/Carthage/Carthage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Carthage/Carthage/downloads","issues_url":"https://api.github.com/repos/Carthage/Carthage/issues{/number}","pulls_url":"https://api.github.com/repos/Carthage/Carthage/pulls{/number}","milestones_url":"https://api.github.com/repos/Carthage/Carthage/milestones{/number}","notifications_url":"https://api.github.com/repos/Carthage/Carthage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Carthage/Carthage/labels{/name}","releases_url":"https://api.github.com/repos/Carthage/Carthage/releases{/id}","deployments_url":"https://api.github.com/repos/Carthage/Carthage/deployments","created_at":"2014-10-10T19:54:55Z","updated_at":"2016-04-04T03:58:00Z","pushed_at":"2016-04-04T01:18:59Z","git_url":"git://github.com/Carthage/Carthage.git","ssh_url":"git@github.com:Carthage/Carthage.git","clone_url":"https://github.com/Carthage/Carthage.git","svn_url":"https://github.com/Carthage/Carthage","homepage":"","size":11162,"stargazers_count":6461,"watchers_count":6461,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":441,"mirror_url":null,"open_issues_count":151,"forks":441,"open_issues":151,"watchers":6461,"default_branch":"master"}},"base":{"label":"Carthage:master","ref":"master","sha":"58011523586e670d93d8fd6214879d2dbcc4ce7e","user":{"login":"Carthage","id":9146792,"avatar_url":"https://avatars.githubusercontent.com/u/9146792?v=3","gravatar_id":"","url":"https://api.github.com/users/Carthage","html_url":"https://github.com/Carthage","followers_url":"https://api.github.com/users/Carthage/followers","following_url":"https://api.github.com/users/Carthage/following{/other_user}","gists_url":"https://api.github.com/users/Carthage/gists{/gist_id}","starred_url":"https://api.github.com/users/Carthage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carthage/subscriptions","organizations_url":"https://api.github.com/users/Carthage/orgs","repos_url":"https://api.github.com/users/Carthage/repos","events_url":"https://api.github.com/users/Carthage/events{/privacy}","received_events_url":"https://api.github.com/users/Carthage/received_events","type":"Organization","site_admin":false},"repo":{"id":25050844,"name":"Carthage","full_name":"Carthage/Carthage","owner":{"login":"Carthage","id":9146792,"avatar_url":"https://avatars.githubusercontent.com/u/9146792?v=3","gravatar_id":"","url":"https://api.github.com/users/Carthage","html_url":"https://github.com/Carthage","followers_url":"https://api.github.com/users/Carthage/followers","following_url":"https://api.github.com/users/Carthage/following{/other_user}","gists_url":"https://api.github.com/users/Carthage/gists{/gist_id}","starred_url":"https://api.github.com/users/Carthage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carthage/subscriptions","organizations_url":"https://api.github.com/users/Carthage/orgs","repos_url":"https://api.github.com/users/Carthage/repos","events_url":"https://api.github.com/users/Carthage/events{/privacy}","received_events_url":"https://api.github.com/users/Carthage/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Carthage/Carthage","description":"A simple, decentralized dependency manager for Cocoa","fork":false,"url":"https://api.github.com/repos/Carthage/Carthage","forks_url":"https://api.github.com/repos/Carthage/Carthage/forks","keys_url":"https://api.github.com/repos/Carthage/Carthage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Carthage/Carthage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Carthage/Carthage/teams","hooks_url":"https://api.github.com/repos/Carthage/Carthage/hooks","issue_events_url":"https://api.github.com/repos/Carthage/Carthage/issues/events{/number}","events_url":"https://api.github.com/repos/Carthage/Carthage/events","assignees_url":"https://api.github.com/repos/Carthage/Carthage/assignees{/user}","branches_url":"https://api.github.com/repos/Carthage/Carthage/branches{/branch}","tags_url":"https://api.github.com/repos/Carthage/Carthage/tags","blobs_url":"https://api.github.com/repos/Carthage/Carthage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Carthage/Carthage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Carthage/Carthage/git/refs{/sha}","trees_url":"https://api.github.com/repos/Carthage/Carthage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Carthage/Carthage/statuses/{sha}","languages_url":"https://api.github.com/repos/Carthage/Carthage/languages","stargazers_url":"https://api.github.com/repos/Carthage/Carthage/stargazers","contributors_url":"https://api.github.com/repos/Carthage/Carthage/contributors","subscribers_url":"https://api.github.com/repos/Carthage/Carthage/subscribers","subscription_url":"https://api.github.com/repos/Carthage/Carthage/subscription","commits_url":"https://api.github.com/repos/Carthage/Carthage/commits{/sha}","git_commits_url":"https://api.github.com/repos/Carthage/Carthage/git/commits{/sha}","comments_url":"https://api.github.com/repos/Carthage/Carthage/comments{/number}","issue_comment_url":"https://api.github.com/repos/Carthage/Carthage/issues/comments{/number}","contents_url":"https://api.github.com/repos/Carthage/Carthage/contents/{+path}","compare_url":"https://api.github.com/repos/Carthage/Carthage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Carthage/Carthage/merges","archive_url":"https://api.github.com/repos/Carthage/Carthage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Carthage/Carthage/downloads","issues_url":"https://api.github.com/repos/Carthage/Carthage/issues{/number}","pulls_url":"https://api.github.com/repos/Carthage/Carthage/pulls{/number}","milestones_url":"https://api.github.com/repos/Carthage/Carthage/milestones{/number}","notifications_url":"https://api.github.com/repos/Carthage/Carthage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Carthage/Carthage/labels{/name}","releases_url":"https://api.github.com/repos/Carthage/Carthage/releases{/id}","deployments_url":"https://api.github.com/repos/Carthage/Carthage/deployments","created_at":"2014-10-10T19:54:55Z","updated_at":"2016-04-04T03:58:00Z","pushed_at":"2016-04-04T01:18:59Z","git_url":"git://github.com/Carthage/Carthage.git","ssh_url":"git@github.com:Carthage/Carthage.git","clone_url":"https://github.com/Carthage/Carthage.git","svn_url":"https://github.com/Carthage/Carthage","homepage":"","size":11162,"stargazers_count":6461,"watchers_count":6461,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":441,"mirror_url":null,"open_issues_count":151,"forks":441,"open_issues":151,"watchers":6461,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Carthage/Carthage/pulls/1239"},"html":{"href":"https://github.com/Carthage/Carthage/pull/1239"},"issue":{"href":"https://api.github.com/repos/Carthage/Carthage/issues/1239"},"comments":{"href":"https://api.github.com/repos/Carthage/Carthage/issues/1239/comments"},"review_comments":{"href":"https://api.github.com/repos/Carthage/Carthage/pulls/1239/comments"},"review_comment":{"href":"https://api.github.com/repos/Carthage/Carthage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Carthage/Carthage/pulls/1239/commits"},"statuses":{"href":"https://api.github.com/repos/Carthage/Carthage/statuses/98bcd1f425b3a7aa190e904ff504926b9c99d65f"}}}}