summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-06-02 20:03:52 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-06-06 05:26:50 (GMT)
commitc5db65aef3b4268adbadc8019ecbd7d3fdc374e8 (patch)
treea6570b0b9b905d632246a2ffdb91a5c87721b56b /lib
parent2f85b7e4b421ab032cc2342808640479a988277f (diff)
downloadgit-c5db65aef3b4268adbadc8019ecbd7d3fdc374e8.zip
git-c5db65aef3b4268adbadc8019ecbd7d3fdc374e8.tar.gz
git-c5db65aef3b4268adbadc8019ecbd7d3fdc374e8.tar.bz2
git-gui: Label the uncommitted blame history entry
If the user runs the blame viewer on a working directory file instead of a specific commit-ish then we have no value for the commit SHA1 or the summary line; this causes the history menu to get an empty entry at the very bottom. We now look for this odd case and call the meny entry "Working Directory". Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/blame.tcl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/blame.tcl b/lib/blame.tcl
index d8d27c9..0561fb4 100644
--- a/lib/blame.tcl
+++ b/lib/blame.tcl
@@ -370,6 +370,8 @@ method _history_menu {} {
if {[regexp {^[0-9a-f]{40}$} $c]} {
set t [string range $c 0 8]...
+ } elseif {$c eq {}} {
+ set t {Working Directory}
} else {
set t $c
}