I have three suggestions on committing that I thought would be helpful
to the hacker audience.
First, I have been hesitant to ascribe others as patch authors if I
heavily modified a doc patch because I didn't want them blamed for any
mistakes I made. However, I also want to give them credit, so I decided
I would annotate commits with "partial", e.g.:
Author: Andy Jackson (partial)
Second, I have found the git diff option --word-diff=color to be very
helpful and I have started using it, especially for doc patches where
the old text is in red and the new text is in green. Posting patches in
that format is probably not helpful though.
Third, I have come up with the following shell script to test for proper
pgindentation, which I run automatically before commit:
# https://www.postgresql.org/message-id/CAGECzQQL-Dbb%2BYkid9Dhq-491MawHvi6hR_NGkhiDE%2B5zRZ6vQ%40mail.gmail.com
src/tools/pgindent/pgindent $(git diff --name-only --diff-filter=ACMR) > /tmp/$$
if [ \( "$(wc -l < /tmp/$$)" -eq 1 -a "$(expr match "$(cat /tmp/$$)" "No files to process\>")" -eq 0 \) -o \
"$(wc -l < /tmp/$$)" -gt 1 ]
then echo "pgindent failure in master branch, exiting." 1>&2
cat /tmp/$$
exit 1
fi
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
Only you can decide what is important to you.