Skip to content

Commit

Permalink
fixup! git-gui: fix exception when trying to stage with empty file list
Browse files Browse the repository at this point in the history
  • Loading branch information
dscho committed May 29, 2017
1 parent 26173ab commit 8b4e64d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion git-gui/git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2532,7 +2532,13 @@ proc toggle_or_diff {mode w args} {
}
}
set path [lindex $file_lists($w) [expr {$lno - 1}]]
if {![info exists file_lists]
|| ![info exists file_lists($w)]
|| [llength $file_lists($w)] < $lno - 1} {
set path {}
} else {
set path [lindex $file_lists($w) [expr {$lno - 1}]]
}
if {$path eq {}} {
set last_clicked {}
return
Expand Down

0 comments on commit 8b4e64d

Please sign in to comment.