git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
IBIllia Bobyr <ibobyr@blizzard.com>
Date
Apr 24, 2012, 23:32 UTC
Message-ID
<B1416C005AC3CA488CB124F971A297500D0824@IRVEX008.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

Message 1 of 1 in “[gitk] No commit diff when 'safecrlf' set to true is causing an error”
  1. Illia BobyrApr 24, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.