From 97a7c40ba3fb691e6732ccf5cedb8b4577f89ea8 Mon Sep 17 00:00:00 2001 From: blinry Date: Thu, 14 Jan 2021 11:26:21 +0100 Subject: [PATCH 1/4] Symbols for index-modifying cards, remove index/mv level for now Plus better descriptions for pull/push/fetch. --- cards/add.svg | 118 +++++++++++++++ cards/add.svg.import | 34 +++++ cards/checkout-file.svg | 118 +++++++++++++++ cards/checkout-file.svg.import | 34 +++++ cards/commit.svg | 216 +++++++++++++++++++++++++++ cards/commit.svg.import | 34 +++++ cards/reset-file.svg | 118 +++++++++++++++ cards/reset-file.svg.import | 34 +++++ levels/index/checkout | 2 +- levels/index/reset | 2 +- levels/index/rm | 2 +- levels/index/sequence | 1 - levels/{index/mv => unused/index-mv} | 2 +- resources/cards.json | 19 ++- scenes/card.tscn | 12 +- 15 files changed, 728 insertions(+), 18 deletions(-) create mode 100644 cards/add.svg create mode 100644 cards/add.svg.import create mode 100644 cards/checkout-file.svg create mode 100644 cards/checkout-file.svg.import create mode 100644 cards/commit.svg create mode 100644 cards/commit.svg.import create mode 100644 cards/reset-file.svg create mode 100644 cards/reset-file.svg.import rename levels/{index/mv => unused/index-mv} (91%) diff --git a/cards/add.svg b/cards/add.svg new file mode 100644 index 0000000..8a69469 --- /dev/null +++ b/cards/add.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + diff --git a/cards/add.svg.import b/cards/add.svg.import new file mode 100644 index 0000000..cca9696 --- /dev/null +++ b/cards/add.svg.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/add.svg-6661eafc7f78160aaf9088910aa4975e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://cards/add.svg" +dest_files=[ "res://.import/add.svg-6661eafc7f78160aaf9088910aa4975e.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/cards/checkout-file.svg b/cards/checkout-file.svg new file mode 100644 index 0000000..3f880e8 --- /dev/null +++ b/cards/checkout-file.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + diff --git a/cards/checkout-file.svg.import b/cards/checkout-file.svg.import new file mode 100644 index 0000000..a960142 --- /dev/null +++ b/cards/checkout-file.svg.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/checkout-file.svg-33b29020ffdca452c2ad5907a0f12ad0.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://cards/checkout-file.svg" +dest_files=[ "res://.import/checkout-file.svg-33b29020ffdca452c2ad5907a0f12ad0.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/cards/commit.svg b/cards/commit.svg new file mode 100644 index 0000000..a66cf1b --- /dev/null +++ b/cards/commit.svg @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cards/commit.svg.import b/cards/commit.svg.import new file mode 100644 index 0000000..613bc09 --- /dev/null +++ b/cards/commit.svg.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/commit.svg-81b72e6d51b3c0f35ba9ffe75a779e27.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://cards/commit.svg" +dest_files=[ "res://.import/commit.svg-81b72e6d51b3c0f35ba9ffe75a779e27.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/cards/reset-file.svg b/cards/reset-file.svg new file mode 100644 index 0000000..7d29f15 --- /dev/null +++ b/cards/reset-file.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + diff --git a/cards/reset-file.svg.import b/cards/reset-file.svg.import new file mode 100644 index 0000000..883becf --- /dev/null +++ b/cards/reset-file.svg.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/reset-file.svg-15bbadedca7014f817d5e2a521d1d66b.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://cards/reset-file.svg" +dest_files=[ "res://.import/reset-file.svg-15bbadedca7014f817d5e2a521d1d66b.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/levels/index/checkout b/levels/index/checkout index 186bee8..3c01b09 100644 --- a/levels/index/checkout +++ b/levels/index/checkout @@ -1,5 +1,5 @@ title = Checking out files from the index -cards = add reset checkout-file commit +cards = add reset-file checkout-file commit [description] diff --git a/levels/index/reset b/levels/index/reset index c85ca87..ea47c33 100644 --- a/levels/index/reset +++ b/levels/index/reset @@ -1,5 +1,5 @@ title = Resetting files in the index -cards = add reset commit +cards = add reset-file commit [description] diff --git a/levels/index/rm b/levels/index/rm index db8abcc..637fd22 100644 --- a/levels/index/rm +++ b/levels/index/rm @@ -1,5 +1,5 @@ title = Delete a file in the next commit -cards = add reset checkout-file rm file-delete commit +cards = add reset-file checkout-file rm file-delete commit [description] diff --git a/levels/index/sequence b/levels/index/sequence index 38f0956..b6011ad 100644 --- a/levels/index/sequence +++ b/levels/index/sequence @@ -4,4 +4,3 @@ add reset checkout rm -mv diff --git a/levels/index/mv b/levels/unused/index-mv similarity index 91% rename from levels/index/mv rename to levels/unused/index-mv index 245e0ac..9ff7270 100644 --- a/levels/index/mv +++ b/levels/unused/index-mv @@ -1,5 +1,5 @@ title = Rename a file in the next commit -cards = add reset checkout-file mv commit +cards = add reset-file checkout-file mv commit [description] diff --git a/resources/cards.json b/resources/cards.json index 54173bf..4dddb8e 100644 --- a/resources/cards.json +++ b/resources/cards.json @@ -62,17 +62,17 @@ { "id": "pull", "command": "git pull", - "description": "Get timelines from a friend." + "description": "Get a friend's version of the current timeline, and try to merge it into yours." }, { "id": "fetch", "command": "git fetch [remote]", - "description": "Get timelines from a friend." + "description": "Get a friend's version of the current timeline." }, { "id": "push", "command": "git push", - "description": "Give timelines to a friend." + "description": "Give the current timeline to a friend." }, { "id": "rebase-interactive", @@ -91,8 +91,13 @@ }, { "id": "reset", - "command": "git reset [commit, file]", - "description": "Jump to the commit, and update the index. Keep the current environment.\n\nAlternatively, reset changes in a file in the index." + "command": "git reset [commit]", + "description": "Jump to the commit, and update the index. Keep the current environment." + }, + { + "id": "reset-file", + "command": "git reset [file]", + "description": "Reset the index " }, { "id": "cherry-pick", @@ -122,7 +127,7 @@ { "id": "add", "command": "git add [file]", - "description": "Put the current status of the file into the plan." + "description": "Update the index version of the file to its current real content." }, { "id": "rm", @@ -137,7 +142,7 @@ { "id": "commit", "command": "git commit", - "description": "Make a commit from the plan." + "description": "Make a commit from the current index." }, { "id": "show", diff --git a/scenes/card.tscn b/scenes/card.tscn index fd5b061..e24e2a0 100644 --- a/scenes/card.tscn +++ b/scenes/card.tscn @@ -61,14 +61,14 @@ __meta__ = { position = Vector2( 0, -145.336 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] -position = Vector2( -6.10352e-05, 0.00012207 ) +position = Vector2( -6.10352e-05, -0.641296 ) shape = SubResource( 2 ) [node name="Label" type="Label" parent="."] margin_left = -89.0 margin_top = -279.0 margin_right = 85.0 -margin_bottom = -184.0 +margin_bottom = -189.0 custom_fonts/font = ExtResource( 1 ) custom_colors/font_color = Color( 0, 0, 0, 1 ) text = "Name" @@ -79,7 +79,7 @@ __meta__ = { [node name="ColorRect2" type="Panel" parent="."] margin_left = -97.0 -margin_top = -166.0 +margin_top = -101.0 margin_right = 94.0 margin_bottom = -10.0 mouse_filter = 2 @@ -90,7 +90,7 @@ __meta__ = { [node name="Description" type="Label" parent="."] margin_left = -92.0 -margin_top = -160.0 +margin_top = -98.0 margin_right = 90.0 margin_bottom = -14.0 custom_fonts/font = ExtResource( 7 ) @@ -134,9 +134,9 @@ volume_db = -6.848 [node name="Image" type="TextureRect" parent="."] margin_left = -88.0 -margin_top = -219.0 +margin_top = -215.0 margin_right = 85.0 -margin_bottom = -178.0 +margin_bottom = -134.0 mouse_filter = 2 expand = true stretch_mode = 6 From 7da24b32e7bbf8ae0b5e24b982e6fff9ed43576b Mon Sep 17 00:00:00 2001 From: blinry Date: Thu, 14 Jan 2021 11:30:58 +0100 Subject: [PATCH 2/4] Remove the fetch level for now --- levels/{remotes => unused}/fetch | 0 resources/cards.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename levels/{remotes => unused}/fetch (100%) diff --git a/levels/remotes/fetch b/levels/unused/fetch similarity index 100% rename from levels/remotes/fetch rename to levels/unused/fetch diff --git a/resources/cards.json b/resources/cards.json index 4dddb8e..9670913 100644 --- a/resources/cards.json +++ b/resources/cards.json @@ -97,7 +97,7 @@ { "id": "reset-file", "command": "git reset [file]", - "description": "Reset the index " + "description": "Reset the index version of a file to the version in the commit you're on." }, { "id": "cherry-pick", From b6300c16d9496213b90a863f44cc8734a7f24cb3 Mon Sep 17 00:00:00 2001 From: blinry Date: Thu, 14 Jan 2021 11:38:47 +0100 Subject: [PATCH 3/4] Remote fetch from sequence --- levels/remotes/sequence | 1 - 1 file changed, 1 deletion(-) diff --git a/levels/remotes/sequence b/levels/remotes/sequence index 450c58e..13c5715 100644 --- a/levels/remotes/sequence +++ b/levels/remotes/sequence @@ -1,3 +1,2 @@ friend problems -fetch From b0caf4693c5c18d1f334483d6899da731f6c65bf Mon Sep 17 00:00:00 2001 From: blinry Date: Thu, 14 Jan 2021 11:41:03 +0100 Subject: [PATCH 4/4] 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