diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-07-12 01:45:56 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-07-12 01:45:56 -0700 |
commit | 1b2782a5e2f88bf5e6e2cbb58e54fea015e21af5 (patch) | |
tree | 19c5485ad50623c4c44d9268fdfa5afa98bd2619 /git-gui/lib/commit.tcl | |
parent | 512e44b24501df0b4b231cc7f999f9646d96617b (diff) | |
parent | 20f1a10bfb6c31a3728a74bf1c33cb3cc5ac0c7e (diff) | |
download | git-1b2782a5e2f88bf5e6e2cbb58e54fea015e21af5.tar.gz |
Merge branch 'maint' of git://repo.or.cz/git-gui into maint
* 'maint' of git://repo.or.cz/git-gui:
git-gui: Work around bad interaction between Tcl and cmd.exe on ^{tree}
git-gui: Don't linewrap within console windows
git-gui: Correct ls-tree buffering problem in browser
git-gui: Skip nicknames when selecting author initials
git-gui: Ensure windows shortcuts always have .bat extension
git-gui: Include a Push action on the left toolbar
git-gui: Bind M1-P to push action
git-gui: Don't bind F5/M1-R in all windows
git-gui: Unlock the index when cancelling merge dialog
git-gui: properly popup error if gitk should be started but is not installed
Diffstat (limited to 'git-gui/lib/commit.tcl')
-rw-r--r-- | git-gui/lib/commit.tcl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/git-gui/lib/commit.tcl b/git-gui/lib/commit.tcl index f9791f64db..e139f4da2b 100644 --- a/git-gui/lib/commit.tcl +++ b/git-gui/lib/commit.tcl @@ -260,7 +260,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. |