On Tue, May 26, 2015 at 04:32:42PM -0300, Alvaro Herrera wrote: > Robert Haas wrote: > > > But every time we pgindent, especially with slightly different > > settings, we cause tools like 'git blame' to return less useful > > answers. And that sucks. > > I've wondered a few times whether there's a way to make pgindent commits > "transparent" to git blame, i.e. blame their modified lines to whatever > commits modified them immediately before.
I wonder if it might be a good idea to separate whitespace changes within a line from line breaks changes. You could do something like a script (it could be used as a git hook) that only enforces or warns about line-break style rules (which are easier to get right, I think), and have a mode of pgindent that only changes whitespace within a line and warns about line break style problems. So an author could be more or less on the hook to have acceptable line-breaks and fix that on their end and intra-line spacing could be fixed en mass with little impact. I can't figure out how painful this would be in practice. It's probably not worth it.... Garick -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers