I can use the gitk tool to view the current changes that have do not committed yet.
But when I update the git from 2.29.2.windows.3
to 2.33.0.windows.2
diff is gone. only show
I don't know what happened. I tried to read the release note but couldn't find the answer.
I'm not sure if this is related to the following changes
last commit: 2020/09/11: gitk: replace tabs tith spaces
I don't want to use any replacement tools (like using git gui to view changes); I want gitk to work as well as it used to.
CodePudding user response:
As j6t noted in a comment, this is a bug in the current versions of Git, scheduled to be fixed in an upcoming release.
Technically, the issue has to do with
gitk
using the--cc
option every time. This used to work forgit diff-index
, with the--cc
being ignored when the index is not in conflicted state, and the--cc
producing a combined diff when the index is in a conflicted state (i.e., when you have an unresolved merge). Nowgit diff-index --cc
produces an error message and quits, andgitk
thinks that this means there are no unstaged changes.(The
--cc
option togit diff-index
was never documented and was accidentally removed, instead of becoming documented. This shows why it's dangerous to depend on undocumented behavior: you can't tell if it was intended. It probably was, in this case, but the person who improvedgit diff
handling for merges didn't know this.)