Gmane
Picon
From: Matthieu Moy <Matthieu.Moy <at> grenoble-inp.fr>
Subject: [BUG] git gui blame: Show History Context broken since 29e5573d
Newsgroups: gmane.comp.version-control.git
Date: 2010-02-22 08:27:00 GMT (1 year, 50 weeks, 2 days, 20 hours and 4 minutes ago)
Hi,

In "git gui blame", right-clicking on the left fringe and chosing
"Show History Context" in the context-menu doesn't work for me in the
latest git. It says:

couldn't change working directory to "": no such file or directory
couldn't change working directory to "": no such file or directory
    while executing
"cd $_gitworktree"
    (procedure "do_gitk" line 25)
    invoked from within
"do_gitk $cmdline"
    (procedure "blame::_gitkcommit" line 47)
    invoked from within
"blame::_gitkcommit ::blame::__o1::__d"
    invoked from within
".ctxm invoke active"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list $w invoke active]"
    (procedure "tk::MenuInvoke" line 50)
    invoked from within
"tk::MenuInvoke .ctxm 1"
    (command bound to event)

Git bisect shows me the guilty commit:

commit 29e5573d1ef67c92314c39e55d26504fee119c04
Author: Giuseppe Bilotta <giuseppe.bilotta <at> gmail.com>
Date:   Sat Jan 23 11:03:35 2010 +0100

    git-gui: handle bare repos correctly

    Refactor checking for a bare repository into its own proc, that relies
    on git rev-parse --is-bare-repository if possible. For older versions of
    git we fall back to a logic such that the repository is considered bare
    if:
     * either the core.bare setting is true
     * or the worktree is not set and the directory name ends with .git
    The error message for the case of an unhandled bare repository is also
    updated to reflect the fact that the problem is not the funny name but
    the bareness.

    The new refactored proc is also used to disable the menu entry to
    explore the working copy, and to skip changing to the worktree before
    the gitk invocation.

    Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta <at> gmail.com>
    Signed-off-by: Shawn O. Pearce <spearce <at> spearce.org>

This is in a non-bare repo.

Anyone to fix this?

Thanks,

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/