Document how I use .gitattributes to clean git diffs.

This commit is contained in:
Julien Palard 2017-08-01 13:36:07 +02:00
parent 4ef9eaac76
commit 1310b2163f
2 changed files with 31 additions and 0 deletions

11
.gitattributes vendored Normal file
View File

@ -0,0 +1,11 @@
# Usefull with:
#
# cat <<EOF > ~/.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

View File

@ -190,6 +190,26 @@ became the official french Python documentation translation thanks to
`PEP 545 <https://www.python.org/dev/peps/pep-0545/>`_.
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 <<EOF > ~/.local/bin/podiff
#!/bin/sh
grep -v '^#:' "$1"
EOF
chmod a+x ~/.local/bin/podiff
git config diff.podiff.textconv podiff
Maintenance
-----------