mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-24 16:20:08 +01:00
Don't display the "refs/heads" component of branches
This commit is contained in:
parent
b6300c16d9
commit
b0caf4693c
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue