aboutsummaryrefslogtreecommitdiffstats
path: root/lib/commit.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/commit.tcl')
-rw-r--r--lib/commit.tcl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/commit.tcl b/lib/commit.tcl
index 37b3808f7e..2fd57a51fb 100644
--- a/lib/commit.tcl
+++ b/lib/commit.tcl
@@ -346,6 +346,7 @@ proc commit_committree {fd_wt curHEAD msg_p} {
global file_states selected_paths rescan_active
global repo_config
global env
+ global hashlength
gets $fd_wt tree_id
if {[catch {close $fd_wt} err]} {
@@ -365,7 +366,7 @@ proc commit_committree {fd_wt curHEAD msg_p} {
close $fd_ot
if {[string equal -length 5 {tree } $old_tree]
- && [string length $old_tree] == 45} {
+ && [string length $old_tree] == [expr {$hashlength + 5}]} {
set old_tree [string range $old_tree 5 end]
} else {
error [mc "Commit %s appears to be corrupt" $PARENT]
ain&id=9874576995c8ecf800e48dead0e34c36defa91b4&follow=1'>t9107: switch inverted single/double quotes in testJeff King1-2/+3 2016-05-14t9107: use "return 1" instead of "exit 1"Jeff King1-16/+26 2016-05-13diff: run arguments through precompose_argvAlexander Rinass5-0/+47 2016-05-13t9100,t3419: enclose all test code in single-quotesJeff King2-20/+20 2016-05-13t/lib-git-svn: drop $remote_git_svn and $git_svn_idJeff King11-63/+60 2016-05-13Twelfth batch for 2.9Junio C Hamano1-0/+20 2016-05-13git-multimail: update to release 1.3.1Matthieu Moy4-4/+20 2016-05-13Documentation: clarify signature verificationKeller Fuchs2-4/+7