diff --git a/lib/commit.tcl b/lib/commit.tcl index 89eb8c7b739131..0ffc3ec0284024 100644 --- a/lib/commit.tcl +++ b/lib/commit.tcl @@ -386,7 +386,9 @@ proc commit_committree {fd_wt curHEAD msg_p} { set fd_ot [git_read [list cat-file commit $PARENT]] fconfigure $fd_ot -encoding iso8859-1 set old_tree [gets $fd_ot] - close $fd_ot + # Ignore a failure at close time: on Windows the child may + # die writing the unread tail of the commit object. + catch {close $fd_ot} if {[string equal -length 5 {tree } $old_tree] && [string length $old_tree] == [expr {$hashlength + 5}]} {