Skip to content

Commit c5db65a

Browse files
committed
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 <[email protected]>
1 parent 2f85b7e commit c5db65a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/blame.tcl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,8 @@ method _history_menu {} {
370370

371371
if {[regexp {^[0-9a-f]{40}$} $c]} {
372372
set t [string range $c 0 8]...
373+
} elseif {$c eq {}} {
374+
set t {Working Directory}
373375
} else {
374376
set t $c
375377
}

0 commit comments

Comments
 (0)