summaryrefslogtreecommitdiff
path: root/git-gui/lib/commit.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'git-gui/lib/commit.tcl')
-rw-r--r--git-gui/lib/commit.tcl13
1 files changed, 1 insertions, 12 deletions
diff --git a/git-gui/lib/commit.tcl b/git-gui/lib/commit.tcl
index e139f4da2b..f9791f64db 100644
--- a/git-gui/lib/commit.tcl
+++ b/git-gui/lib/commit.tcl
@@ -260,18 +260,7 @@ proc commit_committree {fd_wt curHEAD msg} {
# -- Verify this wasn't an empty change.
#
if {$commit_type eq {normal}} {
- set fd_ot [open "| git cat-file commit $PARENT" r]
- fconfigure $fd_ot -encoding binary -translation lf
- set old_tree [gets $fd_ot]
- close $fd_ot
-
- if {[string equal -length 5 {tree } $old_tree]
- && [string length $old_tree] == 45} {
- set old_tree [string range $old_tree 5 end]
- } else {
- error "Commit $PARENT appears to be corrupt"
- }
-
+ set old_tree [git rev-parse "$PARENT^{tree}"]
if {$tree_id eq $old_tree} {
info_popup {No changes to commit.