mirror of
https://github.com/git/git.git
synced 2026-01-27 02:48:32 +00:00
fixup! git-gui: fix exception when trying to stage with empty file list
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user