.gitattributes diff filters are not respected when viewing diffs
- OS: Manjaro GNU/Linux 18.0.4
- giggle: 0.7
Files with diff filters set in .gitattributes do not have their filters respected when viewing diffs in gitg. Instead, the diff says only
Binary files /dev/null and b/secretfile differ.
This behavior is observed with git-crypt in particular, but this may also apply to other filters applied in .gitattributes
Steps to reproduce
Steps to reproduce the behavior:
$ mkdir test-repo && cd test-repo $ git init $ git crypt init $ git crypt add-gpg-user email@example.com
- Configure git-crypt to act on a file.
$ echo "secretfile filter=git-crypt diff=git-crypt" > .gitattributes $ git add . && git commit -m "Add secretfile encryption to .gitattributes"
- Modify that file and stage the changes.
$ echo "this is secret" > secretfile && git add .
- View the diff in giggle.
Binary files /dev/null and b/secretfile differ, the proper filtered diff should appear.
For my above example, the proper diff can be seen with
$ git diff --staged diff --git a/secretfile b/secretfile new file mode 100644 index 0000000..a2446a1 --- /dev/null +++ b/secretfile @@ -0,0 +1 @@ +this is secret
The same issue occurs with gitg, but works fine with gitk.