{"action":"created","comment":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/pulls/comments/242972678","pull_request_review_id":186590227,"id":242972678,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0Mjk3MjY3OA==","diff_hunk":"@@ -22,8 +22,11 @@ namespace firebase {\n namespace firestore {\n namespace model {\n \n-NoDocument::NoDocument(DocumentKey key, SnapshotVersion version)\n-    : MaybeDocument(std::move(key), std::move(version)) {\n+NoDocument::NoDocument(DocumentKey key,\n+                       SnapshotVersion version,\n+                       bool has_committed_mutations)\n+    : MaybeDocument(std::move(key), std::move(version)),","path":"Firestore/core/src/firebase/firestore/model/no_document.cc","position":9,"original_position":9,"commit_id":"8cef18c7626995efc0add4a32812c5de9914af58","original_commit_id":"faf0390259d642623cbf0271506b706fe0c492fc","user":{"login":"rsgowman","id":11047174,"node_id":"MDQ6VXNlcjExMDQ3MTc0","avatar_url":"https://avatars2.githubusercontent.com/u/11047174?v=4","gravatar_id":"","url":"https://api.github.com/users/rsgowman","html_url":"https://github.com/rsgowman","followers_url":"https://api.github.com/users/rsgowman/followers","following_url":"https://api.github.com/users/rsgowman/following{/other_user}","gists_url":"https://api.github.com/users/rsgowman/gists{/gist_id}","starred_url":"https://api.github.com/users/rsgowman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsgowman/subscriptions","organizations_url":"https://api.github.com/users/rsgowman/orgs","repos_url":"https://api.github.com/users/rsgowman/repos","events_url":"https://api.github.com/users/rsgowman/events{/privacy}","received_events_url":"https://api.github.com/users/rsgowman/received_events","type":"User","site_admin":false},"body":"For non-primitive types, I usually just std::move it, unless it's *really* obvious that the thing is small. (really obvious => documented as small.) We can probably assume that with SnapshotVersion (and Timestamp), since it seems unlikely that either will grow.\r\n\r\nSomewhat related: http://go/c-readability-advice#value-param\r\n\r\nProposal: Since you've called this optional, and since we std::move SnapshotVersion's (and probably Timestamp's too) somewhat inconsistently in the rest of the code, I'll defer this for now. But I'll create a followup inspired by the above readability link that:\r\na) ensures std::is_trivially_copyable()\r\nb) ensures sizeof <= 16\r\nfor these types, and then:\r\nc) remove usages of std::move and const&.","created_at":"2018-12-19T16:00:51Z","updated_at":"2018-12-19T16:17:07Z","html_url":"https://github.com/firebase/firebase-ios-sdk/pull/2160#discussion_r242972678","pull_request_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/pulls/2160","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/firebase/firebase-ios-sdk/pulls/comments/242972678"},"html":{"href":"https://github.com/firebase/firebase-ios-sdk/pull/2160#discussion_r242972678"},"pull_request":{"href":"https://api.github.com/repos/firebase/firebase-ios-sdk/pulls/2160"}},"in_reply_to_id":241868041},"pull_request":{"url":"https://api.github.com/repos/firebase/firebase-ios-sdk/pulls/2160","id":236931273,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2OTMxMjcz","html_url":"https://github.com/firebase/firebase-ios-sdk/pull/2160","diff_url":"https://github.com/firebase/firebase-ios-sdk/pull/2160.diff","patch_url":"https://github.com/firebase/firebase-ios-sdk/pull/2160.patch","issue_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/2160","number":2160,"state":"open","locked":false,"title":"Port DocumentState and UnknownDocument.","user":{"login":"rsgowman","id":11047174,"node_id":"MDQ6VXNlcjExMDQ3MTc0","avatar_url":"https://avatars2.githubusercontent.com/u/11047174?v=4","gravatar_id":"","url":"https://api.github.com/users/rsgowman","html_url":"https://github.com/rsgowman","followers_url":"https://api.github.com/users/rsgowman/followers","following_url":"https://api.github.com/users/rsgowman/following{/other_user}","gists_url":"https://api.github.com/users/rsgowman/gists{/gist_id}","starred_url":"https://api.github.com/users/rsgowman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsgowman/subscriptions","organizations_url":"https://api.github.com/users/rsgowman/orgs","repos_url":"https://api.github.com/users/rsgowman/repos","events_url":"https://api.github.com/users/rsgowman/events{/privacy}","received_events_url":"https://api.github.com/users/rsgowman/received_events","type":"User","site_admin":false},"body":"Part of heldwriteacks.\r\n\r\nSerialization work for this is largely deferred until after\r\nnanopb-master is merged with master.","created_at":"2018-12-07T16:55:12Z","updated_at":"2018-12-19T16:17:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66f7df62c7cb56113b42cdfd4bec1bc4124fab38","assignee":{"login":"rsgowman","id":11047174,"node_id":"MDQ6VXNlcjExMDQ3MTc0","avatar_url":"https://avatars2.githubusercontent.com/u/11047174?v=4","gravatar_id":"","url":"https://api.github.com/users/rsgowman","html_url":"https://github.com/rsgowman","followers_url":"https://api.github.com/users/rsgowman/followers","following_url":"https://api.github.com/users/rsgowman/following{/other_user}","gists_url":"https://api.github.com/users/rsgowman/gists{/gist_id}","starred_url":"https://api.github.com/users/rsgowman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsgowman/subscriptions","organizations_url":"https://api.github.com/users/rsgowman/orgs","repos_url":"https://api.github.com/users/rsgowman/repos","events_url":"https://api.github.com/users/rsgowman/events{/privacy}","received_events_url":"https://api.github.com/users/rsgowman/received_events","type":"User","site_admin":false},"assignees":[{"login":"rsgowman","id":11047174,"node_id":"MDQ6VXNlcjExMDQ3MTc0","avatar_url":"https://avatars2.githubusercontent.com/u/11047174?v=4","gravatar_id":"","url":"https://api.github.com/users/rsgowman","html_url":"https://github.com/rsgowman","followers_url":"https://api.github.com/users/rsgowman/followers","following_url":"https://api.github.com/users/rsgowman/following{/other_user}","gists_url":"https://api.github.com/users/rsgowman/gists{/gist_id}","starred_url":"https://api.github.com/users/rsgowman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsgowman/subscriptions","organizations_url":"https://api.github.com/users/rsgowman/orgs","repos_url":"https://api.github.com/users/rsgowman/repos","events_url":"https://api.github.com/users/rsgowman/events{/privacy}","received_events_url":"https://api.github.com/users/rsgowman/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":658858759,"node_id":"MDU6TGFiZWw2NTg4NTg3NTk=","url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels/cla:%20yes","name":"cla: yes","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/pulls/2160/commits","review_comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/pulls/2160/comments","review_comment_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/2160/comments","statuses_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/statuses/8cef18c7626995efc0add4a32812c5de9914af58","head":{"label":"firebase:rsgowman/unknown_document","ref":"rsgowman/unknown_document","sha":"8cef18c7626995efc0add4a32812c5de9914af58","user":{"login":"firebase","id":1335026,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMzUwMjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1335026?v=4","gravatar_id":"","url":"https://api.github.com/users/firebase","html_url":"https://github.com/firebase","followers_url":"https://api.github.com/users/firebase/followers","following_url":"https://api.github.com/users/firebase/following{/other_user}","gists_url":"https://api.github.com/users/firebase/gists{/gist_id}","starred_url":"https://api.github.com/users/firebase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firebase/subscriptions","organizations_url":"https://api.github.com/users/firebase/orgs","repos_url":"https://api.github.com/users/firebase/repos","events_url":"https://api.github.com/users/firebase/events{/privacy}","received_events_url":"https://api.github.com/users/firebase/received_events","type":"Organization","site_admin":false},"repo":{"id":89033556,"node_id":"MDEwOlJlcG9zaXRvcnk4OTAzMzU1Ng==","name":"firebase-ios-sdk","full_name":"firebase/firebase-ios-sdk","private":false,"owner":{"login":"firebase","id":1335026,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMzUwMjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1335026?v=4","gravatar_id":"","url":"https://api.github.com/users/firebase","html_url":"https://github.com/firebase","followers_url":"https://api.github.com/users/firebase/followers","following_url":"https://api.github.com/users/firebase/following{/other_user}","gists_url":"https://api.github.com/users/firebase/gists{/gist_id}","starred_url":"https://api.github.com/users/firebase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firebase/subscriptions","organizations_url":"https://api.github.com/users/firebase/orgs","repos_url":"https://api.github.com/users/firebase/repos","events_url":"https://api.github.com/users/firebase/events{/privacy}","received_events_url":"https://api.github.com/users/firebase/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/firebase/firebase-ios-sdk","description":"Firebase iOS SDK","fork":false,"url":"https://api.github.com/repos/firebase/firebase-ios-sdk","forks_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/forks","keys_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/teams","hooks_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/hooks","issue_events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/events","assignees_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/tags","blobs_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/languages","stargazers_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/stargazers","contributors_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/contributors","subscribers_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/subscribers","subscription_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/subscription","commits_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/merges","archive_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/downloads","issues_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels{/name}","releases_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/deployments","created_at":"2017-04-22T00:26:50Z","updated_at":"2018-12-19T10:40:48Z","pushed_at":"2018-12-19T16:16:50Z","git_url":"git://github.com/firebase/firebase-ios-sdk.git","ssh_url":"git@github.com:firebase/firebase-ios-sdk.git","clone_url":"https://github.com/firebase/firebase-ios-sdk.git","svn_url":"https://github.com/firebase/firebase-ios-sdk","homepage":"https://firebase.google.com","size":15940,"stargazers_count":960,"watchers_count":960,"language":"Objective-C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":206,"mirror_url":null,"archived":false,"open_issues_count":95,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":206,"open_issues":95,"watchers":960,"default_branch":"master"}},"base":{"label":"firebase:master","ref":"master","sha":"bc0855048a7cd252137d7dc9b962ac93d50dbdae","user":{"login":"firebase","id":1335026,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMzUwMjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1335026?v=4","gravatar_id":"","url":"https://api.github.com/users/firebase","html_url":"https://github.com/firebase","followers_url":"https://api.github.com/users/firebase/followers","following_url":"https://api.github.com/users/firebase/following{/other_user}","gists_url":"https://api.github.com/users/firebase/gists{/gist_id}","starred_url":"https://api.github.com/users/firebase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firebase/subscriptions","organizations_url":"https://api.github.com/users/firebase/orgs","repos_url":"https://api.github.com/users/firebase/repos","events_url":"https://api.github.com/users/firebase/events{/privacy}","received_events_url":"https://api.github.com/users/firebase/received_events","type":"Organization","site_admin":false},"repo":{"id":89033556,"node_id":"MDEwOlJlcG9zaXRvcnk4OTAzMzU1Ng==","name":"firebase-ios-sdk","full_name":"firebase/firebase-ios-sdk","private":false,"owner":{"login":"firebase","id":1335026,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMzUwMjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1335026?v=4","gravatar_id":"","url":"https://api.github.com/users/firebase","html_url":"https://github.com/firebase","followers_url":"https://api.github.com/users/firebase/followers","following_url":"https://api.github.com/users/firebase/following{/other_user}","gists_url":"https://api.github.com/users/firebase/gists{/gist_id}","starred_url":"https://api.github.com/users/firebase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firebase/subscriptions","organizations_url":"https://api.github.com/users/firebase/orgs","repos_url":"https://api.github.com/users/firebase/repos","events_url":"https://api.github.com/users/firebase/events{/privacy}","received_events_url":"https://api.github.com/users/firebase/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/firebase/firebase-ios-sdk","description":"Firebase iOS SDK","fork":false,"url":"https://api.github.com/repos/firebase/firebase-ios-sdk","forks_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/forks","keys_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/teams","hooks_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/hooks","issue_events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/events","assignees_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/tags","blobs_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/languages","stargazers_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/stargazers","contributors_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/contributors","subscribers_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/subscribers","subscription_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/subscription","commits_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/merges","archive_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/downloads","issues_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/labels{/name}","releases_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/firebase/firebase-ios-sdk/deployments","created_at":"2017-04-22T00:26:50Z","updated_at":"2018-12-19T10:40:48Z","pushed_at":"2018-12-19T16:16:50Z","git_url":"git://github.com/firebase/firebase-ios-sdk.git","ssh_url":"git@github.com:firebase/firebase-ios-sdk.git","clone_url":"https://github.com/firebase/firebase-ios-sdk.git","svn_url":"https://github.com/firebase/firebase-ios-sdk","homepage":"https://firebase.google.com","size":15940,"stargazers_count":960,"watchers_count":960,"language":"Objective-C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":206,"mirror_url":null,"archived":false,"open_issues_count":95,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":206,"open_issues":95,"watchers":960,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/firebase/firebase-ios-sdk/pulls/2160"},"html":{"href":"https://github.com/firebase/firebase-ios-sdk/pull/2160"},"issue":{"href":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/2160"},"comments":{"href":"https://api.github.com/repos/firebase/firebase-ios-sdk/issues/2160/comments"},"review_comments":{"href":"https://api.github.com/repos/firebase/firebase-ios-sdk/pulls/2160/comments"},"review_comment":{"href":"https://api.github.com/repos/firebase/firebase-ios-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/firebase/firebase-ios-sdk/pulls/2160/commits"},"statuses":{"href":"https://api.github.com/repos/firebase/firebase-ios-sdk/statuses/8cef18c7626995efc0add4a32812c5de9914af58"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"rsgowman"}}