# [gitk] No commit diff when 'safecrlf' set to true is causing an error

1 messages from 2012-04-24 to 2012-04-24. Participants: Illia Bobyr.
Thread: https://gitlist.dev/t/30330

## Illia Bobyr, 2012-04-24 23:32

Subject: [gitk] No commit diff when 'safecrlf' set to true is causing an error
Message-ID: <B1416C005AC3CA488CB124F971A297500D0824@IRVEX008.corp.blizzard.net>
URL: https://gitlist.dev/e/B1416C005AC3CA488CB124F971A297500D0824%40IRVEX008.corp.blizzard.net

```
Hi,

The idea of my complain is that if a patch may not be shown because diff-tree returns an error, that error should be visible to the user.
Right now it is silently ignored.

I hit this when I was changing between profiles with different safecrlf/autocrlf settings and some commits would not show any diffs any more in gitk.  Without any errors.

Here is a test case:

mkdir gitk-silent-error-test
cd gitk-silent-error-test

git init .

git config core.autocrlf false
git config core.safecrlf false

echo hello > test
git add test
git commit -m 1

echo there >> test
git add test
git commit -m 2

gitk

In the gitk window I now see both commits along with the commit messages, but do not see the patch for the second commit.
And as a user I do not really understand why at this point there are no error messages.

I was able to figure out that it is the git diff-tree command that gitk is using who is complaining.
It seems a little unintuitive that error in the file format in my working directory affects what gitk is showing.

I think that gitk should have provided a --no-check argument to diff-tree if there would be one.  But there is none.
And I might be wrong about the best solution.

Thank you,
Ilya Bobyr

```
