diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..7f909e53 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,11 @@ +# Usefull with: +# +# cat < ~/.local/bin/podiff +# #!/bin/sh +# grep -v '^#:' "$1" +# EOF +# chmod a+x ~/.local/bin/podiff +# git config diff.podiff.textconv podiff + +*.po diff=podiff +*.pot diff=podiff diff --git a/README.rst b/README.rst index 319a6003..aba340a2 100644 --- a/README.rst +++ b/README.rst @@ -190,6 +190,26 @@ became the official french Python documentation translation thanks to `PEP 545 `_. +Simplify git diffs +------------------ + +Git diffs are often crowded with useless line number changes, like: + + -#: ../Doc/library/signal.rst:406 + +#: ../Doc/library/signal.rst:408 + +To tell git they are not usefull information, you can do the following +after ensuring ``~/.local/bin/`` is in your ``PATH``. + + cat < ~/.local/bin/podiff + #!/bin/sh + grep -v '^#:' "$1" + EOF + + chmod a+x ~/.local/bin/podiff + + git config diff.podiff.textconv podiff + Maintenance -----------