This is on latest OSX with the latest version of git.
The issue is that when you do 'git gui blame', a highly annoying list of errors fills your terminal window, to wit:
CFURLCopyResourcePropertyForKey failed because it was passed an URL which has no schema
CFURLCopyResourcePropertyForKey failed because it was passed an URL which has no schema
CFURLCopyResourcePropertyForKey failed because it was passed an URL which has no schema
CFURLCopyResourcePropertyForKey failed because it was passed an URL which has no schema
I looked around and saw other posts talking about this, none of which talked about how to fix 'git gui blame'. The post about gitk was the closest.
I tried 'brew install tcl-tk', but that doesn't fix the issue. I also upgraded to the latest git.
I then poked around how git gui blame is implemented, and eventually discovered that it ultimately executes this script:
/usr/local/Cellar/git/2.19.2/share/git-gui
which contains
#!/bin/sh
if test "z$*" = zversion ||
test "z$*" = z--version
then
echo 'git-gui version 0.21.GITGUI'
else
libdir="${GIT_GUI_LIB_DIR:-/usr/local/Cellar/git/2.19.2/share/git-gui/lib}"
exec "$libdir/Git Gui.app/Contents/MacOS/Wish" "$0" "$@"
fi
The 'Wish' here is an OSX application which uses the built-in version of tcl-tk. Which I guess explains why installing a new version of tck-tk doesn't affect it, since it's got a hardcoded path to the built-in (old) version of tcl-tk in it.
I'm able to hide the error messages by changing /usr/local/Cellar/git/2.19.2/share/git-gui like this:
#!/bin/sh
if test "z$*" = zversion ||
test "z$*" = z--version
then
echo 'git-gui version 0.21.GITGUI'
else
libdir="${GIT_GUI_LIB_DIR:-/usr/local/Cellar/git/2.19.2/share/git-gui/lib}"
exec "$libdir/Git Gui.app/Contents/MacOS/Wish" "$0" "$@" 2>/dev/null
fi
Note the redirect '2>/dev/null'.
However I feel like this isn't really a brillant fix, it's only hiding the error. Plus, it'll revert when I upgrade git.
Does anyone have any idea of how to really fix the problem?