From dc981d8af72a1e9b3af72a8a32235696205cc9a0 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sat, 1 Jun 2019 13:51:10 +0200 Subject: [PATCH] Display longer Git hashes in engine version dialogs Due to the high number of commits in the Godot repository, 7-character hashes were starting to become occasionally ambiguous. In contrast, 9-character hashes are currently unambiguous for all commits. --- editor/editor_about.cpp | 2 +- editor/project_manager.cpp | 2 +- main/main.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp index e9dd6d71999..bea1980b09b 100644 --- a/editor/editor_about.cpp +++ b/editor/editor_about.cpp @@ -131,7 +131,7 @@ EditorAbout::EditorAbout() { String hash = String(VERSION_HASH); if (hash.length() != 0) - hash = "." + hash.left(7); + hash = "." + hash.left(9); Label *about_text = memnew(Label); about_text->set_v_size_flags(Control::SIZE_SHRINK_CENTER); diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index b0baf954d28..7b521aba13f 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -1971,7 +1971,7 @@ ProjectManager::ProjectManager() { l = memnew(Label); String hash = String(VERSION_HASH); if (hash.length() != 0) - hash = "." + hash.left(7); + hash = "." + hash.left(9); l->set_text("v" VERSION_FULL_BUILD "" + hash); l->set_align(Label::ALIGN_CENTER); top_hb->add_child(l); diff --git a/main/main.cpp b/main/main.cpp index 8c742c0f938..a01d1abe43a 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -161,7 +161,7 @@ static String unescape_cmdline(const String &p_str) { static String get_full_version_string() { String hash = String(VERSION_HASH); if (hash.length() != 0) - hash = "." + hash.left(7); + hash = "." + hash.left(9); return String(VERSION_FULL_BUILD) + hash; }