Hi, While using "git bisect visualize" on my PC running Ubuntu 10.10, I came across this error: $ git bisect visualize eval: 1: gitk: not found git: 'bisect' is not a git command. See 'git --help'. Did you mean this? bisect $ As this distribution don't keep "gitk" as a dependency for git,we will have to install "gitk" as a separate package. However, I found the error message a bit confusing. So,I have prepared a "quick and dirty" patch to solve it. Please let me know your comments. Signed-off-by: Maxin B. John <maxin@xxxxxxxxxxxxxxx> --- diff --git a/git-bisect.sh b/git-bisect.sh index c21e33c..fefe212 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -290,7 +290,8 @@ bisect_visualize() { then case "${DISPLAY+set}${SESSIONNAME+set}${MSYSTEM+set}${SECURITYSESSIONID+set}" in '') set git log ;; - set*) set gitk ;; + set*) is_gitk_present + set gitk ;; esac else case "$1" in diff --git a/git-sh-setup.sh b/git-sh-setup.sh index aa16b83..5e78b54 100644 --- a/git-sh-setup.sh +++ b/git-sh-setup.sh @@ -132,6 +132,14 @@ is_bare_repository () { git rev-parse --is-bare-repository } +is_gitk_present () { + GIT_GITK=$(which gitk) + test -n "$GIT_GITK" || { + echo >&2 "Cannot find 'gitk' in the PATH" + exit 1 + } +} + cd_to_toplevel () { cdup=$(git rev-parse --show-toplevel) && cd "$cdup" || { -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html