git: Add diff drivers for function context

Map common source and documentation file types to Git's built-in diff
drivers so `git diff -W` expands hunks using language-aware function or
section boundaries instead of generic text context.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski
2026-06-17 13:44:50 +02:00
parent 39fe05769e
commit d7ba469dd8

7
.gitattributes vendored
View File

@@ -1 +1,8 @@
Dockerfile* linguist-language=Dockerfile
*.c diff=cpp
*.h diff=cpp
*.go diff=golang
*.md diff=markdown
*.py diff=python
*.sh diff=bash