From b0caf4693c5c18d1f334483d6899da731f6c65bf Mon Sep 17 00:00:00 2001 From: blinry Date: Thu, 14 Jan 2021 11:41:03 +0100 Subject: [PATCH] Don't display the "refs/heads" component of branches --- scenes/node.gd | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scenes/node.gd b/scenes/node.gd index 7150532..b056da9 100644 --- a/scenes/node.gd +++ b/scenes/node.gd @@ -17,6 +17,7 @@ var arrow = preload("res://scenes/arrow.tscn") func _ready(): content_set(content) type_set(type) + id_set(id) if not repository.simplified_view or (type != "tree" and type != "blob"): $Pop.pitch_scale = rand_range(0.8, 1.2) $Pop.play() @@ -57,6 +58,10 @@ func apply_forces(): func id_set(new_id): id = new_id $ID.text = id + if type == "ref": + $ID.text = $ID.text.replace("refs/heads/", "") + $ID.text = $ID.text.replace("refs/remotes/", "") + $ID.text = $ID.text.replace("refs/tags/", "") func content_set(new_content): content = new_content