From: Junio C Hamano Date: Thu, 16 May 2019 23:33:59 GMT Subject: Re: [PATCH v3] userdiff.c & doc/gitattributes.txt: add Octave Message-ID: In-Reply-To: <262eb1d4-a898-c6d0-8e04-ce6c58eaa4e6@kdbg.org> Johannes Sixt writes: > I'd prefer to keep this list at the minimum necessary as long as it is > hard-coded in C. Yeah, I know that feeling. > I would take a different stance if this were some > configuration file that we ship. Hmm, now you reminded me of my ancient wish. Perhaps it is not too bad to ship $(sharedir)/git-core/userdiff that can be read using git_config_from_file() interface, using a very narrow callback function that understands only diff.*.xfuncname and diff.*.wordregex and discards everything else, without even following the include/includeIf stuff? As long as that can be done safely and without too much overhead, we could get rid of the hardcoded patterns in userdiff.c::builtin_drivers[] and that would be wonderful ;-)