{"action":"created","issue":{"url":"https://api.github.com/repos/greenplum-db/gpdb/issues/72","labels_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/72/comments","events_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/72/events","html_url":"https://github.com/greenplum-db/gpdb/pull/72","id":116163693,"number":72,"title":"Revert some unnecessary cosmetic changes, compared to upstream","user":{"login":"hlinnaka","id":191602,"avatar_url":"https://avatars.githubusercontent.com/u/191602?v=3","gravatar_id":"","url":"https://api.github.com/users/hlinnaka","html_url":"https://github.com/hlinnaka","followers_url":"https://api.github.com/users/hlinnaka/followers","following_url":"https://api.github.com/users/hlinnaka/following{/other_user}","gists_url":"https://api.github.com/users/hlinnaka/gists{/gist_id}","starred_url":"https://api.github.com/users/hlinnaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlinnaka/subscriptions","organizations_url":"https://api.github.com/users/hlinnaka/orgs","repos_url":"https://api.github.com/users/hlinnaka/repos","events_url":"https://api.github.com/users/hlinnaka/events{/privacy}","received_events_url":"https://api.github.com/users/hlinnaka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-10T17:47:23Z","updated_at":"2015-11-11T09:07:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/72","html_url":"https://github.com/greenplum-db/gpdb/pull/72","diff_url":"https://github.com/greenplum-db/gpdb/pull/72.diff","patch_url":"https://github.com/greenplum-db/gpdb/pull/72.patch"},"body":"This reduces our diff footprint, which will reduce the number of merge conflicts we'll get when we start merging with upstream."},"comment":{"url":"https://api.github.com/repos/greenplum-db/gpdb/issues/comments/155710062","html_url":"https://github.com/greenplum-db/gpdb/pull/72#issuecomment-155710062","issue_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/72","id":155710062,"user":{"login":"hlinnaka","id":191602,"avatar_url":"https://avatars.githubusercontent.com/u/191602?v=3","gravatar_id":"","url":"https://api.github.com/users/hlinnaka","html_url":"https://github.com/hlinnaka","followers_url":"https://api.github.com/users/hlinnaka/followers","following_url":"https://api.github.com/users/hlinnaka/following{/other_user}","gists_url":"https://api.github.com/users/hlinnaka/gists{/gist_id}","starred_url":"https://api.github.com/users/hlinnaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlinnaka/subscriptions","organizations_url":"https://api.github.com/users/hlinnaka/orgs","repos_url":"https://api.github.com/users/hlinnaka/repos","events_url":"https://api.github.com/users/hlinnaka/events{/privacy}","received_events_url":"https://api.github.com/users/hlinnaka/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T09:07:55Z","updated_at":"2015-11-11T09:07:55Z","body":"On 11/10/2015 09:08 PM, Ashwin Agrawal wrote:\n> Can we run pgindent and fix it in one shot ?\n\nYeah, that would be one approach. There are some drawbacks:\n\n* It would have to be done with the exact same version of pgindent that \nwas used in the upstream. There have been small changes in the rules \nover the years.\n* Not all the code is all the time correctly indented in the upstream, \neither. Running pgindent on such code would in fact create a difference \nwhere there wasn't one before. If merging a later upstream pgindent run \nwould bring the code to the same result again, you probably wouldn't get \na merge conflict, but I wouldn't count on it.\n* There are some code blocks in GPDB that are intentionally not \n\"correctly\" indented, to minimize the diff against upstream. The typical \ncase is when a large chunk of upstream code is put inside an if-block in \nGPDB: you might want to avoid re-intending the code that's now inside \nthe if-block, so patches to that code will not cause a merge conflict.\n* Re-indenting all the gpdb code would cause conflicts to anyone \ncurrently working on patches. (this would be a one-off inconvenience \nthough, and it would be nice to re-indent all the gpdb code for \naesthetic grounds anyway.)\n\nOverall, I don't think it's worth it to just run pgindent over \neverything in one go. There actually isn't that much of these whitespace \ndifferences left anyway, I've already cleaned up the worst offenders.\n\nIt would be nice to run pgindent on all of src/backend/cdb at some point \nthough, just to make it look better.\n\n> Plus contributors and committers need to make sure not to introduce more\n> but is it good idea to automate to run it at commit time to avoid having\n> more issues introduced ?\n\nSame problems apply to any automation. But I highly recommend installing \npgindent on your laptop, so that you can easily run it on any new code \nbefore committing. Also, pay attention to the diff vs. upstream. Before \npushing, do a \"git diff REL8_2_0 <file>\" on any files you've modified, \nto check that you haven't introduced any unnecessary differences.\n\n- Heikki\n\n"}}