{"action":"created","comment":{"url":"https://api.github.com/repos/CocoaPods/Xcodeproj/pulls/comments/120469660","pull_request_review_id":42435556,"id":120469660,"diff_hunk":"@@ -81,13 +81,13 @@ def self.autoload_implementation\n     #         The contents of the file.\n     #\n     def self.file_in_conflict?(contents)\n-      conflict_regex = %r{\n-          ^<{7}(?!<) # Exactly 7 left arrows at the beginning of the line\n-          [\\w\\W]* # Anything\n-          ^={7}(?!=) # Exactly 7 equality symbols at the beginning of the line\n-          [\\w\\W]* # Anything\n-          ^>{7}(?!>) # Exaxtly 7 right arrows at the beginning of the line\n-      }mx\n+      conflict_regex = /\n+        ^<{7}(?!<) # Exactly 7 left arrows at the beginning of the line\n+        [\\w\\W]* # Anything\n+        ^={7}(?!=) # Exactly 7 equality symbols at the beginning of the line\n+        [\\w\\W]* # Anything\n+        ^>{7}(?!>) # Exaxtly 7 right arrows at the beginning of the line","path":"lib/xcodeproj/plist.rb","position":15,"original_position":16,"commit_id":"53662eea235fc9fa331d5dd7eb9a4dcdb2c513cb","original_commit_id":"53662eea235fc9fa331d5dd7eb9a4dcdb2c513cb","user":{"login":"dnkoutso","id":310370,"avatar_url":"https://avatars1.githubusercontent.com/u/310370?v=3","gravatar_id":"","url":"https://api.github.com/users/dnkoutso","html_url":"https://github.com/dnkoutso","followers_url":"https://api.github.com/users/dnkoutso/followers","following_url":"https://api.github.com/users/dnkoutso/following{/other_user}","gists_url":"https://api.github.com/users/dnkoutso/gists{/gist_id}","starred_url":"https://api.github.com/users/dnkoutso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnkoutso/subscriptions","organizations_url":"https://api.github.com/users/dnkoutso/orgs","repos_url":"https://api.github.com/users/dnkoutso/repos","events_url":"https://api.github.com/users/dnkoutso/events{/privacy}","received_events_url":"https://api.github.com/users/dnkoutso/received_events","type":"User","site_admin":false},"body":"nit, typo `exactly`","created_at":"2017-06-06T20:20:11Z","updated_at":"2017-06-06T20:20:11Z","html_url":"https://github.com/CocoaPods/Xcodeproj/pull/495#discussion_r120469660","pull_request_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/pulls/495","_links":{"self":{"href":"https://api.github.com/repos/CocoaPods/Xcodeproj/pulls/comments/120469660"},"html":{"href":"https://github.com/CocoaPods/Xcodeproj/pull/495#discussion_r120469660"},"pull_request":{"href":"https://api.github.com/repos/CocoaPods/Xcodeproj/pulls/495"}}},"pull_request":{"url":"https://api.github.com/repos/CocoaPods/Xcodeproj/pulls/495","id":124254961,"html_url":"https://github.com/CocoaPods/Xcodeproj/pull/495","diff_url":"https://github.com/CocoaPods/Xcodeproj/pull/495.diff","patch_url":"https://github.com/CocoaPods/Xcodeproj/pull/495.patch","issue_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/issues/495","number":495,"state":"open","locked":false,"title":"Provides narrower regex for conflict marker detect","user":{"login":"allenhumphreys","id":8225090,"avatar_url":"https://avatars2.githubusercontent.com/u/8225090?v=3","gravatar_id":"","url":"https://api.github.com/users/allenhumphreys","html_url":"https://github.com/allenhumphreys","followers_url":"https://api.github.com/users/allenhumphreys/followers","following_url":"https://api.github.com/users/allenhumphreys/following{/other_user}","gists_url":"https://api.github.com/users/allenhumphreys/gists{/gist_id}","starred_url":"https://api.github.com/users/allenhumphreys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenhumphreys/subscriptions","organizations_url":"https://api.github.com/users/allenhumphreys/orgs","repos_url":"https://api.github.com/users/allenhumphreys/repos","events_url":"https://api.github.com/users/allenhumphreys/events{/privacy}","received_events_url":"https://api.github.com/users/allenhumphreys/received_events","type":"User","site_admin":false},"body":"I recently ran into a situation when parsing the acknowledgements file within my Podfile. One of the pods (libidn v1.33) has the following in their license:\r\n\r\n```\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\nTHE SOFTWARE.\r\n\r\n===============================================\r\n\r\nLibidn COPYING -- Explanation of licensing conditions.\r\nCopyright (C) 2002-2015 Simon Josefsson\r\n```\r\n\r\nThe regex currently used in `file_in_conflict` is detecting this section separator as a merge conflict, thus `Plist.read_from_path` is refusing to open the file.\r\n\r\nI'm proposing a new regex for matching the entire conflict marker sequence which is:\r\n1. beginning of line, followed by exactly 7 left angle brackets\r\n2. any characters\r\n3. beginning of line followed by exactly 7 equality symbols\r\n4. any characters\r\n5. beginning of line followed by exactly 7 right angle brackets \r\n\r\nA trivial script for testing the regex\r\n```\r\n#!/usr/bin/env ruby\r\n\r\ndef file_in_conflict?(contents)\r\n\r\n    contents.match(/^<{7}(?!<)[\\w\\W]*^={7}(?!=)[\\w\\W]*^>{7}(?!>)/m)\r\nend\r\n\r\nconflict_example = \"<<<<<<< HEAD\r\nwords and stuff go here\r\n=======\r\nother, different words go here\r\n>>>>>>> 8ab358aeba3f\r\n\"\r\n\r\nif file_in_conflict?(conflict_example)\r\n    puts \"This is in conflict\" # Expect this\r\nelse\r\n    puts \"This is not in conflict\"\r\nend\r\n\r\nnon_conflict_example = \"<<<<<<<<\r\nwords and stuff go here\r\n========\r\nother, different words go here\r\n>>>>>>>>\r\n\"\r\n\r\nif file_in_conflict?(non_conflict_example)\r\n    puts \"This is in conflict\"\r\nelse\r\n    puts \"This is not in conflict\" # Expect this\r\nend\r\n```","created_at":"2017-06-06T18:15:58Z","updated_at":"2017-06-06T20:20:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"485d2c3c55afb997029b5769690777a9d159c6fe","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/pulls/495/commits","review_comments_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/pulls/495/comments","review_comment_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/issues/495/comments","statuses_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/statuses/53662eea235fc9fa331d5dd7eb9a4dcdb2c513cb","head":{"label":"allenhumphreys:fix-overeager-conflictmatching","ref":"fix-overeager-conflictmatching","sha":"53662eea235fc9fa331d5dd7eb9a4dcdb2c513cb","user":{"login":"allenhumphreys","id":8225090,"avatar_url":"https://avatars2.githubusercontent.com/u/8225090?v=3","gravatar_id":"","url":"https://api.github.com/users/allenhumphreys","html_url":"https://github.com/allenhumphreys","followers_url":"https://api.github.com/users/allenhumphreys/followers","following_url":"https://api.github.com/users/allenhumphreys/following{/other_user}","gists_url":"https://api.github.com/users/allenhumphreys/gists{/gist_id}","starred_url":"https://api.github.com/users/allenhumphreys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenhumphreys/subscriptions","organizations_url":"https://api.github.com/users/allenhumphreys/orgs","repos_url":"https://api.github.com/users/allenhumphreys/repos","events_url":"https://api.github.com/users/allenhumphreys/events{/privacy}","received_events_url":"https://api.github.com/users/allenhumphreys/received_events","type":"User","site_admin":false},"repo":{"id":93544987,"name":"Xcodeproj","full_name":"allenhumphreys/Xcodeproj","owner":{"login":"allenhumphreys","id":8225090,"avatar_url":"https://avatars2.githubusercontent.com/u/8225090?v=3","gravatar_id":"","url":"https://api.github.com/users/allenhumphreys","html_url":"https://github.com/allenhumphreys","followers_url":"https://api.github.com/users/allenhumphreys/followers","following_url":"https://api.github.com/users/allenhumphreys/following{/other_user}","gists_url":"https://api.github.com/users/allenhumphreys/gists{/gist_id}","starred_url":"https://api.github.com/users/allenhumphreys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenhumphreys/subscriptions","organizations_url":"https://api.github.com/users/allenhumphreys/orgs","repos_url":"https://api.github.com/users/allenhumphreys/repos","events_url":"https://api.github.com/users/allenhumphreys/events{/privacy}","received_events_url":"https://api.github.com/users/allenhumphreys/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/allenhumphreys/Xcodeproj","description":"Create and modify Xcode projects from Ruby.","fork":true,"url":"https://api.github.com/repos/allenhumphreys/Xcodeproj","forks_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/forks","keys_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/keys{/key_id}","collaborators_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/teams","hooks_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/hooks","issue_events_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/issues/events{/number}","events_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/events","assignees_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/assignees{/user}","branches_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/branches{/branch}","tags_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/tags","blobs_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/git/refs{/sha}","trees_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/git/trees{/sha}","statuses_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/statuses/{sha}","languages_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/languages","stargazers_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/stargazers","contributors_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/contributors","subscribers_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/subscribers","subscription_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/subscription","commits_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/commits{/sha}","git_commits_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/git/commits{/sha}","comments_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/comments{/number}","issue_comment_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/issues/comments{/number}","contents_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/contents/{+path}","compare_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/compare/{base}...{head}","merges_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/merges","archive_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/downloads","issues_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/issues{/number}","pulls_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/pulls{/number}","milestones_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/milestones{/number}","notifications_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/labels{/name}","releases_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/releases{/id}","deployments_url":"https://api.github.com/repos/allenhumphreys/Xcodeproj/deployments","created_at":"2017-06-06T17:24:37Z","updated_at":"2017-06-06T17:24:39Z","pushed_at":"2017-06-06T20:19:18Z","git_url":"git://github.com/allenhumphreys/Xcodeproj.git","ssh_url":"git@github.com:allenhumphreys/Xcodeproj.git","clone_url":"https://github.com/allenhumphreys/Xcodeproj.git","svn_url":"https://github.com/allenhumphreys/Xcodeproj","homepage":"http://rubygems.org/gems/xcodeproj","size":3263,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"CocoaPods:master","ref":"master","sha":"d9be15fd7ac90c54c64b455b23edddbd670488d5","user":{"login":"CocoaPods","id":1189714,"avatar_url":"https://avatars2.githubusercontent.com/u/1189714?v=3","gravatar_id":"","url":"https://api.github.com/users/CocoaPods","html_url":"https://github.com/CocoaPods","followers_url":"https://api.github.com/users/CocoaPods/followers","following_url":"https://api.github.com/users/CocoaPods/following{/other_user}","gists_url":"https://api.github.com/users/CocoaPods/gists{/gist_id}","starred_url":"https://api.github.com/users/CocoaPods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CocoaPods/subscriptions","organizations_url":"https://api.github.com/users/CocoaPods/orgs","repos_url":"https://api.github.com/users/CocoaPods/repos","events_url":"https://api.github.com/users/CocoaPods/events{/privacy}","received_events_url":"https://api.github.com/users/CocoaPods/received_events","type":"Organization","site_admin":false},"repo":{"id":2725544,"name":"Xcodeproj","full_name":"CocoaPods/Xcodeproj","owner":{"login":"CocoaPods","id":1189714,"avatar_url":"https://avatars2.githubusercontent.com/u/1189714?v=3","gravatar_id":"","url":"https://api.github.com/users/CocoaPods","html_url":"https://github.com/CocoaPods","followers_url":"https://api.github.com/users/CocoaPods/followers","following_url":"https://api.github.com/users/CocoaPods/following{/other_user}","gists_url":"https://api.github.com/users/CocoaPods/gists{/gist_id}","starred_url":"https://api.github.com/users/CocoaPods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CocoaPods/subscriptions","organizations_url":"https://api.github.com/users/CocoaPods/orgs","repos_url":"https://api.github.com/users/CocoaPods/repos","events_url":"https://api.github.com/users/CocoaPods/events{/privacy}","received_events_url":"https://api.github.com/users/CocoaPods/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CocoaPods/Xcodeproj","description":"Create and modify Xcode projects from Ruby.","fork":false,"url":"https://api.github.com/repos/CocoaPods/Xcodeproj","forks_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/forks","keys_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/teams","hooks_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/hooks","issue_events_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/issues/events{/number}","events_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/events","assignees_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/assignees{/user}","branches_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/branches{/branch}","tags_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/tags","blobs_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/git/refs{/sha}","trees_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/statuses/{sha}","languages_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/languages","stargazers_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/stargazers","contributors_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/contributors","subscribers_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/subscribers","subscription_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/subscription","commits_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/commits{/sha}","git_commits_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/git/commits{/sha}","comments_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/comments{/number}","issue_comment_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/issues/comments{/number}","contents_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/contents/{+path}","compare_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/merges","archive_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/downloads","issues_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/issues{/number}","pulls_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/pulls{/number}","milestones_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/milestones{/number}","notifications_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/labels{/name}","releases_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/releases{/id}","deployments_url":"https://api.github.com/repos/CocoaPods/Xcodeproj/deployments","created_at":"2011-11-07T10:59:27Z","updated_at":"2017-06-06T03:30:22Z","pushed_at":"2017-06-06T20:19:19Z","git_url":"git://github.com/CocoaPods/Xcodeproj.git","ssh_url":"git@github.com:CocoaPods/Xcodeproj.git","clone_url":"https://github.com/CocoaPods/Xcodeproj.git","svn_url":"https://github.com/CocoaPods/Xcodeproj","homepage":"http://rubygems.org/gems/xcodeproj","size":3279,"stargazers_count":850,"watchers_count":850,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":241,"mirror_url":null,"open_issues_count":53,"forks":241,"open_issues":53,"watchers":850,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CocoaPods/Xcodeproj/pulls/495"},"html":{"href":"https://github.com/CocoaPods/Xcodeproj/pull/495"},"issue":{"href":"https://api.github.com/repos/CocoaPods/Xcodeproj/issues/495"},"comments":{"href":"https://api.github.com/repos/CocoaPods/Xcodeproj/issues/495/comments"},"review_comments":{"href":"https://api.github.com/repos/CocoaPods/Xcodeproj/pulls/495/comments"},"review_comment":{"href":"https://api.github.com/repos/CocoaPods/Xcodeproj/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CocoaPods/Xcodeproj/pulls/495/commits"},"statuses":{"href":"https://api.github.com/repos/CocoaPods/Xcodeproj/statuses/53662eea235fc9fa331d5dd7eb9a4dcdb2c513cb"}}}}
{"actor":{"display_login":"dnkoutso"}}