• G
    git-gui: handle bare repos correctly · 29e5573d
    Giuseppe Bilotta 提交于
    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: NGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
    Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
    29e5573d
git-gui.sh 89.4 KB