summaryrefslogtreecommitdiff
path: root/builtin/commit-tree.c
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-01-23 11:03:35 +0100
committerShawn O. Pearce <spearce@spearce.org>2010-01-23 15:14:21 -0800
commit29e5573d1ef67c92314c39e55d26504fee119c04 (patch)
tree49d765fd396462b806d7bfc62839a65fd48873ab /builtin/commit-tree.c
parent21985a11360fc845b73f8300a8739b7b073f0627 (diff)
downloadgit-29e5573d1ef67c92314c39e55d26504fee119c04.tar.gz
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@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'builtin/commit-tree.c')
0 files changed, 0 insertions, 0 deletions