Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  git-gui: Work around bad interaction between Tcl and cmd.exe on ^{tree}
  • Loading branch information
Shawn O. Pearce committed Jul 12, 2007
2 parents 264f4a3 + 20f1a10 commit f31b6ff
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/commit.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,18 @@ proc commit_committree {fd_wt curHEAD msg} {
# -- Verify this wasn't an empty change.
#
if {$commit_type eq {normal}} {
set old_tree [git rev-parse "$PARENT^{tree}"]
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"
}

if {$tree_id eq $old_tree} {
info_popup {No changes to commit.

Expand Down

0 comments on commit f31b6ff

Please sign in to comment.