{"action":"created","comment":{"url":"https://api.github.com/repos/systemd/systemd/pulls/comments/50283155","id":50283155,"diff_hunk":"@@ -94,25 +94,86 @@ const struct hash_ops catalog_hash_ops = {\n         .compare = catalog_compare_func\n };\n \n+static bool next_header(const char **s) {\n+        const char *e;\n+\n+        e = strchr (*s, '\\n');\n+\n+        /* Unexpected end */\n+        if (!e)\n+                return false;\n+\n+        /* End of headers */\n+        if (e == *s)\n+                return false;\n+\n+        *s = e + 1;\n+        return true;\n+}\n+\n+static char *combine_entries(const char *one, const char *two) {","path":"src/journal/catalog.c","position":21,"original_position":21,"commit_id":"c4efbccb07561b1ae6c87d8d6f3b46196556aa0c","original_commit_id":"c4efbccb07561b1ae6c87d8d6f3b46196556aa0c","user":{"login":"zonque","id":106304,"avatar_url":"https://avatars.githubusercontent.com/u/106304?v=3","gravatar_id":"","url":"https://api.github.com/users/zonque","html_url":"https://github.com/zonque","followers_url":"https://api.github.com/users/zonque/followers","following_url":"https://api.github.com/users/zonque/following{/other_user}","gists_url":"https://api.github.com/users/zonque/gists{/gist_id}","starred_url":"https://api.github.com/users/zonque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zonque/subscriptions","organizations_url":"https://api.github.com/users/zonque/orgs","repos_url":"https://api.github.com/users/zonque/repos","events_url":"https://api.github.com/users/zonque/events{/privacy}","received_events_url":"https://api.github.com/users/zonque/received_events","type":"User","site_admin":false},"body":"We generally prefer to return real errors, and pass back allocated pointers through a `**` pointer. This allows proper error propagation up the call stack.","created_at":"2016-01-20T17:01:06Z","updated_at":"2016-01-20T17:01:06Z","html_url":"https://github.com/systemd/systemd/pull/2138#discussion_r50283155","pull_request_url":"https://api.github.com/repos/systemd/systemd/pulls/2138","_links":{"self":{"href":"https://api.github.com/repos/systemd/systemd/pulls/comments/50283155"},"html":{"href":"https://github.com/systemd/systemd/pull/2138#discussion_r50283155"},"pull_request":{"href":"https://api.github.com/repos/systemd/systemd/pulls/2138"}}},"pull_request":{"url":"https://api.github.com/repos/systemd/systemd/pulls/2138","id":53371848,"html_url":"https://github.com/systemd/systemd/pull/2138","diff_url":"https://github.com/systemd/systemd/pull/2138.diff","patch_url":"https://github.com/systemd/systemd/pull/2138.patch","issue_url":"https://api.github.com/repos/systemd/systemd/issues/2138","number":2138,"state":"open","locked":false,"title":"Combine journal catalog entries with the same id","user":{"login":"stefwalter","id":795070,"avatar_url":"https://avatars.githubusercontent.com/u/795070?v=3","gravatar_id":"","url":"https://api.github.com/users/stefwalter","html_url":"https://github.com/stefwalter","followers_url":"https://api.github.com/users/stefwalter/followers","following_url":"https://api.github.com/users/stefwalter/following{/other_user}","gists_url":"https://api.github.com/users/stefwalter/gists{/gist_id}","starred_url":"https://api.github.com/users/stefwalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefwalter/subscriptions","organizations_url":"https://api.github.com/users/stefwalter/orgs","repos_url":"https://api.github.com/users/stefwalter/repos","events_url":"https://api.github.com/users/stefwalter/events{/privacy}","received_events_url":"https://api.github.com/users/stefwalter/received_events","type":"User","site_admin":false},"body":"Instead of discarding duplicate catalog entries, we now combine them. This allows software or admins to add or override catalog headers, or add additional text to the catalog message.\r\n\r\nThis was discussed and implemented at systemd.conf Hackfest. I just forgot to make a pull request :S","created_at":"2015-12-11T09:46:22Z","updated_at":"2016-01-20T17:01:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6eeed4ab9fbe681d1a554698cd899b7d083e6769","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/systemd/systemd/pulls/2138/commits","review_comments_url":"https://api.github.com/repos/systemd/systemd/pulls/2138/comments","review_comment_url":"https://api.github.com/repos/systemd/systemd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/systemd/systemd/issues/2138/comments","statuses_url":"https://api.github.com/repos/systemd/systemd/statuses/c4efbccb07561b1ae6c87d8d6f3b46196556aa0c","head":{"label":"stefwalter:journal-combine","ref":"journal-combine","sha":"c4efbccb07561b1ae6c87d8d6f3b46196556aa0c","user":{"login":"stefwalter","id":795070,"avatar_url":"https://avatars.githubusercontent.com/u/795070?v=3","gravatar_id":"","url":"https://api.github.com/users/stefwalter","html_url":"https://github.com/stefwalter","followers_url":"https://api.github.com/users/stefwalter/followers","following_url":"https://api.github.com/users/stefwalter/following{/other_user}","gists_url":"https://api.github.com/users/stefwalter/gists{/gist_id}","starred_url":"https://api.github.com/users/stefwalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefwalter/subscriptions","organizations_url":"https://api.github.com/users/stefwalter/orgs","repos_url":"https://api.github.com/users/stefwalter/repos","events_url":"https://api.github.com/users/stefwalter/events{/privacy}","received_events_url":"https://api.github.com/users/stefwalter/received_events","type":"User","site_admin":false},"repo":{"id":40720071,"name":"systemd","full_name":"stefwalter/systemd","owner":{"login":"stefwalter","id":795070,"avatar_url":"https://avatars.githubusercontent.com/u/795070?v=3","gravatar_id":"","url":"https://api.github.com/users/stefwalter","html_url":"https://github.com/stefwalter","followers_url":"https://api.github.com/users/stefwalter/followers","following_url":"https://api.github.com/users/stefwalter/following{/other_user}","gists_url":"https://api.github.com/users/stefwalter/gists{/gist_id}","starred_url":"https://api.github.com/users/stefwalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefwalter/subscriptions","organizations_url":"https://api.github.com/users/stefwalter/orgs","repos_url":"https://api.github.com/users/stefwalter/repos","events_url":"https://api.github.com/users/stefwalter/events{/privacy}","received_events_url":"https://api.github.com/users/stefwalter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stefwalter/systemd","description":"systemd upstream","fork":true,"url":"https://api.github.com/repos/stefwalter/systemd","forks_url":"https://api.github.com/repos/stefwalter/systemd/forks","keys_url":"https://api.github.com/repos/stefwalter/systemd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stefwalter/systemd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stefwalter/systemd/teams","hooks_url":"https://api.github.com/repos/stefwalter/systemd/hooks","issue_events_url":"https://api.github.com/repos/stefwalter/systemd/issues/events{/number}","events_url":"https://api.github.com/repos/stefwalter/systemd/events","assignees_url":"https://api.github.com/repos/stefwalter/systemd/assignees{/user}","branches_url":"https://api.github.com/repos/stefwalter/systemd/branches{/branch}","tags_url":"https://api.github.com/repos/stefwalter/systemd/tags","blobs_url":"https://api.github.com/repos/stefwalter/systemd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stefwalter/systemd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stefwalter/systemd/git/refs{/sha}","trees_url":"https://api.github.com/repos/stefwalter/systemd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stefwalter/systemd/statuses/{sha}","languages_url":"https://api.github.com/repos/stefwalter/systemd/languages","stargazers_url":"https://api.github.com/repos/stefwalter/systemd/stargazers","contributors_url":"https://api.github.com/repos/stefwalter/systemd/contributors","subscribers_url":"https://api.github.com/repos/stefwalter/systemd/subscribers","subscription_url":"https://api.github.com/repos/stefwalter/systemd/subscription","commits_url":"https://api.github.com/repos/stefwalter/systemd/commits{/sha}","git_commits_url":"https://api.github.com/repos/stefwalter/systemd/git/commits{/sha}","comments_url":"https://api.github.com/repos/stefwalter/systemd/comments{/number}","issue_comment_url":"https://api.github.com/repos/stefwalter/systemd/issues/comments{/number}","contents_url":"https://api.github.com/repos/stefwalter/systemd/contents/{+path}","compare_url":"https://api.github.com/repos/stefwalter/systemd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stefwalter/systemd/merges","archive_url":"https://api.github.com/repos/stefwalter/systemd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stefwalter/systemd/downloads","issues_url":"https://api.github.com/repos/stefwalter/systemd/issues{/number}","pulls_url":"https://api.github.com/repos/stefwalter/systemd/pulls{/number}","milestones_url":"https://api.github.com/repos/stefwalter/systemd/milestones{/number}","notifications_url":"https://api.github.com/repos/stefwalter/systemd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stefwalter/systemd/labels{/name}","releases_url":"https://api.github.com/repos/stefwalter/systemd/releases{/id}","created_at":"2015-08-14T14:47:23Z","updated_at":"2015-08-14T14:47:28Z","pushed_at":"2015-12-11T09:45:10Z","git_url":"git://github.com/stefwalter/systemd.git","ssh_url":"git@github.com:stefwalter/systemd.git","clone_url":"https://github.com/stefwalter/systemd.git","svn_url":"https://github.com/stefwalter/systemd","homepage":"http://www.freedesktop.org/wiki/Software/systemd/","size":47252,"stargazers_count":0,"watchers_count":0,"language":"C","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":"systemd:master","ref":"master","sha":"c57d67f718077aadee4e2d0940fb87f513b98671","user":{"login":"systemd","id":1918868,"avatar_url":"https://avatars.githubusercontent.com/u/1918868?v=3","gravatar_id":"","url":"https://api.github.com/users/systemd","html_url":"https://github.com/systemd","followers_url":"https://api.github.com/users/systemd/followers","following_url":"https://api.github.com/users/systemd/following{/other_user}","gists_url":"https://api.github.com/users/systemd/gists{/gist_id}","starred_url":"https://api.github.com/users/systemd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systemd/subscriptions","organizations_url":"https://api.github.com/users/systemd/orgs","repos_url":"https://api.github.com/users/systemd/repos","events_url":"https://api.github.com/users/systemd/events{/privacy}","received_events_url":"https://api.github.com/users/systemd/received_events","type":"Organization","site_admin":false},"repo":{"id":32873313,"name":"systemd","full_name":"systemd/systemd","owner":{"login":"systemd","id":1918868,"avatar_url":"https://avatars.githubusercontent.com/u/1918868?v=3","gravatar_id":"","url":"https://api.github.com/users/systemd","html_url":"https://github.com/systemd","followers_url":"https://api.github.com/users/systemd/followers","following_url":"https://api.github.com/users/systemd/following{/other_user}","gists_url":"https://api.github.com/users/systemd/gists{/gist_id}","starred_url":"https://api.github.com/users/systemd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systemd/subscriptions","organizations_url":"https://api.github.com/users/systemd/orgs","repos_url":"https://api.github.com/users/systemd/repos","events_url":"https://api.github.com/users/systemd/events{/privacy}","received_events_url":"https://api.github.com/users/systemd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/systemd/systemd","description":"systemd upstream","fork":false,"url":"https://api.github.com/repos/systemd/systemd","forks_url":"https://api.github.com/repos/systemd/systemd/forks","keys_url":"https://api.github.com/repos/systemd/systemd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/systemd/systemd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/systemd/systemd/teams","hooks_url":"https://api.github.com/repos/systemd/systemd/hooks","issue_events_url":"https://api.github.com/repos/systemd/systemd/issues/events{/number}","events_url":"https://api.github.com/repos/systemd/systemd/events","assignees_url":"https://api.github.com/repos/systemd/systemd/assignees{/user}","branches_url":"https://api.github.com/repos/systemd/systemd/branches{/branch}","tags_url":"https://api.github.com/repos/systemd/systemd/tags","blobs_url":"https://api.github.com/repos/systemd/systemd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/systemd/systemd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/systemd/systemd/git/refs{/sha}","trees_url":"https://api.github.com/repos/systemd/systemd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/systemd/systemd/statuses/{sha}","languages_url":"https://api.github.com/repos/systemd/systemd/languages","stargazers_url":"https://api.github.com/repos/systemd/systemd/stargazers","contributors_url":"https://api.github.com/repos/systemd/systemd/contributors","subscribers_url":"https://api.github.com/repos/systemd/systemd/subscribers","subscription_url":"https://api.github.com/repos/systemd/systemd/subscription","commits_url":"https://api.github.com/repos/systemd/systemd/commits{/sha}","git_commits_url":"https://api.github.com/repos/systemd/systemd/git/commits{/sha}","comments_url":"https://api.github.com/repos/systemd/systemd/comments{/number}","issue_comment_url":"https://api.github.com/repos/systemd/systemd/issues/comments{/number}","contents_url":"https://api.github.com/repos/systemd/systemd/contents/{+path}","compare_url":"https://api.github.com/repos/systemd/systemd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/systemd/systemd/merges","archive_url":"https://api.github.com/repos/systemd/systemd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/systemd/systemd/downloads","issues_url":"https://api.github.com/repos/systemd/systemd/issues{/number}","pulls_url":"https://api.github.com/repos/systemd/systemd/pulls{/number}","milestones_url":"https://api.github.com/repos/systemd/systemd/milestones{/number}","notifications_url":"https://api.github.com/repos/systemd/systemd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/systemd/systemd/labels{/name}","releases_url":"https://api.github.com/repos/systemd/systemd/releases{/id}","created_at":"2015-03-25T15:27:27Z","updated_at":"2016-01-20T12:18:32Z","pushed_at":"2016-01-20T16:52:31Z","git_url":"git://github.com/systemd/systemd.git","ssh_url":"git@github.com:systemd/systemd.git","clone_url":"https://github.com/systemd/systemd.git","svn_url":"https://github.com/systemd/systemd","homepage":"http://www.freedesktop.org/wiki/Software/systemd/","size":51750,"stargazers_count":787,"watchers_count":787,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":319,"mirror_url":null,"open_issues_count":346,"forks":319,"open_issues":346,"watchers":787,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/systemd/systemd/pulls/2138"},"html":{"href":"https://github.com/systemd/systemd/pull/2138"},"issue":{"href":"https://api.github.com/repos/systemd/systemd/issues/2138"},"comments":{"href":"https://api.github.com/repos/systemd/systemd/issues/2138/comments"},"review_comments":{"href":"https://api.github.com/repos/systemd/systemd/pulls/2138/comments"},"review_comment":{"href":"https://api.github.com/repos/systemd/systemd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/systemd/systemd/pulls/2138/commits"},"statuses":{"href":"https://api.github.com/repos/systemd/systemd/statuses/c4efbccb07561b1ae6c87d8d6f3b46196556aa0c"}}}}