Noah Misch <noah@leadboat.com> writes:
> Yes, a hook intended to enforce pgindent cleanliness should run tree-wide
> pgindent when the given commit(s) change the typedef list. typedef list
> changes essentially become another kind of refactoring that can yield merge
> conflicts. If your commit passed the pgindent check, rebasing it onto a new
> typedefs list may require further indentation changes. New typedefs don't
> tend to change a lot of old code, so I would expect this sort of conflict to
> be minor, compared to all the other sources of conflicts.
In fact, if a typedef addition *does* affect a lot of old code,
that's a good sign that the choice of typedef name ought to be
rethought: it's evidently conflicting with existing names.
I'm not sure what that observation implies for our standard
practices here. But it does suggest that "let pgindent do what
it wants without human oversight" probably isn't a good plan.
We've seen that to be true for other reasons as well, notably that
it can destroy the readability of carefully-laid-out comments.
regards, tom lane