Document how I use .gitattributes to clean git diffs.
This commit is contained in:
parent 4ef9eaac76
commit 1310b2163f
2 changed files with 31 additions and 0 deletions
11 .gitattributes vendored Normal file
11
.gitattributes vendored Normal 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 | ||||
20 README.rst
20
README.rst | | @ -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 | ||||
----------- | ||||
| ||||
| | | |||
Loading…
Add table
Add a link
Reference in a new issue