translation: mark vim.pot as binary Commit: https://github.com/vim/vim/commit/9f4a80e2a7a28334c98f8cf8cfc1e6727dfdef3b Author: Illia Bobyr <illia.bo...@gmail.com> Date: Sun Jul 20 16:47:05 2025 +0200
translation: mark vim.pot as binary `vim.pot` is included in the repository after ```gitcommit commit 59bd74ed4c9ab366182c93bdc430b186729abbad Author: Christian Brabandt <c...@256bit.org> Date: Sun Jul 13 08:26:57 2025 +0200 translation: include vim.pot in the repository ``` And it adds quite a lot of noise to the diffs since then. See the reasoning in a comment in `.gitattributes`. I'm not 100% sure that marking it as binary would have no negative side effects. But I was not able to find a better option in `git help attributes`. Solution suggested in ```gitcommit commit 5d552d652b0197063565ab937d30f92a9ed28545 Author: Christian Brabandt <c...@256bit.org> Date: Tue Jul 15 20:42:48 2025 +0200 translation: ignore vim.pot creation date, regenerate it, rm allfiles Signed-off-by: Christian Brabandt <c...@256bit.org> ``` does not seem to be solving the problem. It only hides the `POT-Creation` line from the `vim.pot` diff. Maybe a more elaborate filter could be used - one that replaces lines numbers in `vim.pot` with `xxxx`, thus removing the most annoying and useless part of the diff. One downside is that it requires everyone to install such a filter locally - it can not be part of the repo config, as far as I understand. closes: #17775 Signed-off-by: Illia Bobyr <illia.bo...@gmail.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/.gitattributes b/.gitattributes index 0a80808f6..bad1d9edb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,11 +1,25 @@ src/testdir/test42.in diff -# vim.pot may change just by incrementing a patch number -# so ignore the following differences: +# `vim.pot` is updated every time any of the *.c files are modified. And as it +# contains line numbers for strings from *.c files, inserting a line into a +# single .c file may cause many lines in the `vim.pot` file to be updated. +# +# This generates a lot of "noise" in the diffs. And especially considering that +# `vim.pot` is a generated file, looking at changes in this file is not useful. +# +# By marking it as binary we tell the git machinery that it should not be +# presented to the user in patches, use "git diff --text" to override +src/po/vim.pot -diff + +# Although vim.pot has been marked as binary, you may want to check the textual differences +# using git --text but still want to ignore some noisy output like: # - POT-Creation Date # - comments pointing to the message source location in # *.c/*.h/*.vim/*.cpp/*.in/*.xs files followed by line numbers -# set this up using: +# Note: location comments should be no longer part of vim.pot, since commit 2844765e903214490e1 +# which add the --no-location argument for xgettext to no longer ouput such comments +# +# To ignore certain changes, setup a custom textconv filter using: # git config diff.ignore_vim_pot.textconv "grep -Ev '^.(POT-Creation-Date:|.*\.([ch]|vim|in|xs|cpp):).*$'" src/po/vim.pot diff=ignore_vim_pot -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1udVWF-00HN2Y-DV%40256bit.org.