2
0
Эх сурвалжийг харах

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.
Hugo Locurcio 6 жил өмнө
parent
commit
dc981d8af7

+ 1 - 1
editor/editor_about.cpp

@@ -131,7 +131,7 @@ EditorAbout::EditorAbout() {
 
 
 	String hash = String(VERSION_HASH);
 	String hash = String(VERSION_HASH);
 	if (hash.length() != 0)
 	if (hash.length() != 0)
-		hash = "." + hash.left(7);
+		hash = "." + hash.left(9);
 
 
 	Label *about_text = memnew(Label);
 	Label *about_text = memnew(Label);
 	about_text->set_v_size_flags(Control::SIZE_SHRINK_CENTER);
 	about_text->set_v_size_flags(Control::SIZE_SHRINK_CENTER);

+ 1 - 1
editor/project_manager.cpp

@@ -1971,7 +1971,7 @@ ProjectManager::ProjectManager() {
 	l = memnew(Label);
 	l = memnew(Label);
 	String hash = String(VERSION_HASH);
 	String hash = String(VERSION_HASH);
 	if (hash.length() != 0)
 	if (hash.length() != 0)
-		hash = "." + hash.left(7);
+		hash = "." + hash.left(9);
 	l->set_text("v" VERSION_FULL_BUILD "" + hash);
 	l->set_text("v" VERSION_FULL_BUILD "" + hash);
 	l->set_align(Label::ALIGN_CENTER);
 	l->set_align(Label::ALIGN_CENTER);
 	top_hb->add_child(l);
 	top_hb->add_child(l);

+ 1 - 1
main/main.cpp

@@ -161,7 +161,7 @@ static String unescape_cmdline(const String &p_str) {
 static String get_full_version_string() {
 static String get_full_version_string() {
 	String hash = String(VERSION_HASH);
 	String hash = String(VERSION_HASH);
 	if (hash.length() != 0)
 	if (hash.length() != 0)
-		hash = "." + hash.left(7);
+		hash = "." + hash.left(9);
 	return String(VERSION_FULL_BUILD) + hash;
 	return String(VERSION_FULL_BUILD) + hash;
 }
 }