From 411c41db7c5b9595570761302ae9da018223c95f Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 9 Nov 2020 14:06:22 +0100 Subject: [PATCH] Prepare for longer commit hashes The 7 digit hashes can produce collisions, so we're planning to use 10 digit hashes in the future. This change prepares for that, although that code is currently dead code, since `$force` is always true (see the respective code comment). --- script/generate_snap_page.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/generate_snap_page.php b/script/generate_snap_page.php index 3b33d28..ccdae02 100644 --- a/script/generate_snap_page.php +++ b/script/generate_snap_page.php @@ -105,7 +105,7 @@ function parse_meta($path) /* Currently we always regenerate the snaps page completely. Alternatively, some more data might need to be checked, for the case the script execution were caught at unlucky point where some build upload is in the incomplete state. Both methods have their up and down sides. */ - if ($force || substr($new['revision_last'], 0, 7) != substr($data[$branch_name]['revision_last'], 1)) { + if ($force || substr($new['revision_last'], 0, 10) != substr($data[$branch_name]['revision_last'], 1)) { echo "new revision\n"; $has_new_revision = true; $data[$branch_name] = $new;