-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
- Gitea version (or commit ref): 1.9
- Git version: 2.17.1
- Operating system: Ubuntu 18.04
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
- Log gist:
Description
Not really sure if this is a bug or a feature. But if a repo has a .gitattributes file the git user running on gitea will ignore it when running functions such as git diff
.
E.g lets say on the Gitea instance we have:
git config --global --edit
To the end of the file we add:
[diff "pandoc"]
textconv=pandoc --to=markdown
prompt = false
[alias]
wdiff = diff --word-diff=color --unified=1
And the repo contains a .gitattributes with contents
*.docx diff=pandoc
Ensuring pandoc is installed we get:
However if we set the .gitattributes globally on the Gitea instance we can run git config --global core.attributesfile <path to some global .gitattributes file>
and point it at a file containing *.docx diff=pandoc
We get the desired result
.gitattributes is used for customising more than just how diffs are rendered. So I imagine this bug could have further implications.