@@ -110,8 +110,8 @@ fn new_commits_to_tip_from_unborn_head() -> anyhow::Result<()> {
110
110
// The HEAD reference was updated, along with all other tag-references that pointed to it.
111
111
let new_commit = outcome. new_commit . expect ( "a new commit was created" ) ;
112
112
insta:: assert_snapshot!( visualize_commit_graph( & repo, new_commit) ?, @r"
113
- * 1c4bb33 (HEAD -> main, another-tip ) third commit
114
- * f1b87da (tag: tag-that-should-not-move) second commit
113
+ * 1c4bb33 (HEAD -> main) third commit
114
+ * f1b87da (tag: tag-that-should-not-move, another-tip ) second commit
115
115
* 0939187 initial commit
116
116
" ) ;
117
117
@@ -132,8 +132,8 @@ fn new_commits_to_tip_from_unborn_head() -> anyhow::Result<()> {
132
132
assure_no_worktree_changes ( & repo) ?;
133
133
// The top commit has a different hash now thanks to amending.
134
134
insta:: assert_snapshot!( graph_commit_outcome( & repo, & outcome) ?, @r"
135
- * 2abfa5c (HEAD -> main, another-tip ) third commit
136
- * f1b87da (tag: tag-that-should-not-move) second commit
135
+ * 2abfa5c (HEAD -> main) third commit
136
+ * f1b87da (tag: tag-that-should-not-move, another-tip ) second commit
137
137
* 0939187 initial commit
138
138
" ) ;
139
139
@@ -194,15 +194,6 @@ fn new_commits_to_tip_from_unborn_head() -> anyhow::Result<()> {
194
194
Sha1(273aeca7ca98af0f7972af6e7859a3ae7fde497a),
195
195
),
196
196
references: [
197
- UpdatedReference {
198
- reference: Git(
199
- FullName(
200
- "refs/heads/another-tip",
201
- ),
202
- ),
203
- old_commit_id: Sha1(2abfa5cc3c7c48b8b9eabbd10c21b88347801f15),
204
- new_commit_id: Sha1(189ac82eb44ddb97677d7d7b1859cf6f2e33a473),
205
- },
206
197
UpdatedReference {
207
198
reference: Git(
208
199
FullName(
@@ -234,9 +225,9 @@ fn new_commits_to_tip_from_unborn_head() -> anyhow::Result<()> {
234
225
write_vrbranches_to_refs ( & vb, & repo) ?;
235
226
// It updates stack heads and stack branch heads.
236
227
insta:: assert_snapshot!( graph_commit_outcome( & repo, & outcome) ?, @r"
237
- * 189ac82 (HEAD -> main, s2-b/second, s1-b/second, another-tip ) fourth commit
228
+ * 189ac82 (HEAD -> main, s2-b/second, s1-b/second) fourth commit
238
229
* 2abfa5c third commit
239
- * f1b87da (tag: tag-that-should-not-move, s2-b/first, s1-b/first) second commit
230
+ * f1b87da (tag: tag-that-should-not-move, s2-b/first, s1-b/first, another-tip ) second commit
240
231
* 0939187 (s2-b/init, s1-b/init) initial commit
241
232
" ) ;
242
233
insta:: assert_snapshot!( visualize_tree( & repo, & outcome) ?, @r#"
@@ -258,7 +249,6 @@ fn new_commits_to_tip_from_unborn_head() -> anyhow::Result<()> {
258
249
/// https://github.com/gitbutlerapp/gitbutler/pull/7596 may affect the solution here, but
259
250
/// it's not yet ready.
260
251
#[ test]
261
- #[ ignore = "needs fixes" ]
262
252
fn new_stack_receives_commit_and_adds_it_to_workspace_commit ( ) -> anyhow:: Result < ( ) > {
263
253
assure_stable_env ( ) ;
264
254
@@ -270,7 +260,7 @@ fn new_stack_receives_commit_and_adds_it_to_workspace_commit() -> anyhow::Result
270
260
let workspace_commit_id = repo. rev_parse_single ( "@" ) ?. detach ( ) ;
271
261
insta:: assert_snapshot!( visualize_commit_graph( & repo, workspace_commit_id) ?, @r"
272
262
* 47c9e16 (HEAD -> main) GitButler Workspace Commit
273
- * b451685 insert 5 lines to the top
263
+ * b451685 (feat1) insert 5 lines to the top
274
264
* d15b5ae (tag: first-commit) init
275
265
" ) ;
276
266
@@ -311,10 +301,10 @@ fn new_stack_receives_commit_and_adds_it_to_workspace_commit() -> anyhow::Result
311
301
// head was updated to point to the new workspace commit.
312
302
insta:: assert_snapshot!( visualize_commit_graph( & repo, repo. head_id( ) ?) ?, @r"
313
303
* 7051951 (HEAD -> main) GitButler Workspace Commit
314
- |\
304
+ |\
315
305
| * 00fbfba (s2/top) new file with 15 lines
316
- * | b451685 (s1/top) insert 5 lines to the top
317
- |/
306
+ * | b451685 (s1/top, feat1 ) insert 5 lines to the top
307
+ |/
318
308
* d15b5ae (tag: first-commit) init
319
309
" ) ;
320
310
@@ -612,8 +602,8 @@ fn insert_commit_into_single_stack_with_signatures() -> anyhow::Result<()> {
612
602
let rewritten_head_id = repo. head_id ( ) ?. detach ( ) ;
613
603
insta:: assert_snapshot!( visualize_commit_graph( & repo, rewritten_head_id) ?, @r"
614
604
* 3d1262e (HEAD -> main) insert 10 lines to the top
615
- * 3aec753 (s1-b/init, first-commit ) between initial and former first
616
- * ecd6722 (tag: first-commit) init
605
+ * 3aec753 (s1-b/init) between initial and former first
606
+ * ecd6722 (tag: first-commit, first-commit ) init
617
607
" ) ;
618
608
insta:: assert_snapshot!( but_testsupport:: visualize_tree( rewritten_head_id. attach( & repo) ) , @r#"
619
609
5fdd313
@@ -640,15 +630,6 @@ fn insert_commit_into_single_stack_with_signatures() -> anyhow::Result<()> {
640
630
old_commit_id: Sha1(ecd67221705b069c4f46365a46c8f2cd8a97ec19),
641
631
new_commit_id: Sha1(3aec75308383b83d85a78a90308a618755a7b0f8),
642
632
},
643
- UpdatedReference {
644
- reference: Git(
645
- FullName(
646
- "refs/heads/first-commit",
647
- ),
648
- ),
649
- old_commit_id: Sha1(ecd67221705b069c4f46365a46c8f2cd8a97ec19),
650
- new_commit_id: Sha1(3aec75308383b83d85a78a90308a618755a7b0f8),
651
- },
652
633
UpdatedReference {
653
634
reference: Git(
654
635
FullName(
@@ -711,8 +692,8 @@ fn insert_commit_into_single_stack_with_signatures() -> anyhow::Result<()> {
711
692
let rewritten_head_id = repo. head_id ( ) ?;
712
693
insta:: assert_snapshot!( visualize_commit_graph( & repo, rewritten_head_id) ?, @r"
713
694
* 4b649eb (HEAD -> main) insert 10 lines to the top
714
- * d26d789 (s1-b/init, first-commit ) between initial and former first
715
- * ecd6722 (tag: first-commit) init
695
+ * d26d789 (s1-b/init) between initial and former first
696
+ * ecd6722 (tag: first-commit, first-commit ) init
716
697
" ) ;
717
698
insta:: assert_snapshot!( but_testsupport:: visualize_tree( rewritten_head_id) , @r#"
718
699
683b451
@@ -880,8 +861,8 @@ fn insert_commits_into_workspace() -> anyhow::Result<()> {
880
861
* a97960f (HEAD -> merge) Merge branch 'A' into merge
881
862
|\
882
863
| * 3538622 (A) add 10 to the beginning
883
- * | 46991ae (s1-b/init, B ) add 10 more lines at end
884
- * | e81b470 add 10 to the end
864
+ * | 46991ae (s1-b/init) add 10 more lines at end
865
+ * | e81b470 (B) add 10 to the end
885
866
|/
886
867
* 9cf2979 (main) init
887
868
" ) ;
@@ -1007,8 +988,8 @@ fn merge_commit_remains_unsigned_in_remerge() -> anyhow::Result<()> {
1007
988
insta:: assert_snapshot!( visualize_commit_graph( & repo, rewritten_head_id) ?, @r"
1008
989
* 595a255 (HEAD -> merge) Merge branch 'A' into merge
1009
990
|\
1010
- | * 057f154 (s1-b/top, A ) remove 5 lines from beginning
1011
- | * eede47d add 10 to the beginning
991
+ | * 057f154 (s1-b/top) remove 5 lines from beginning
992
+ | * eede47d (A) add 10 to the beginning
1012
993
* | 16fe86e (B) add 10 to the end
1013
994
|/
1014
995
* 6074509 (main) init
@@ -1228,8 +1209,8 @@ fn commit_on_top_of_branch_in_workspace() -> anyhow::Result<()> {
1228
1209
insta:: assert_snapshot!( visualize_commit_graph( & repo, rewritten_head_id) ?, @r"
1229
1210
* 09ac476 (HEAD -> merge) Merge branch 'A' into merge
1230
1211
|\
1231
- | * 99f3a1c (s1-b/top, A ) remove 5 lines from beginning
1232
- | * 7f389ed (s1-b/below-top) add 10 to the beginning
1212
+ | * 99f3a1c (s1-b/top) remove 5 lines from beginning
1213
+ | * 7f389ed (s1-b/below-top, A ) add 10 to the beginning
1233
1214
* | 91ef6f6 (s2-b/top, s2-b/below-top, B) add 10 to the end
1234
1215
|/
1235
1216
* ff045ef (main) init
@@ -1316,10 +1297,10 @@ fn commit_on_top_of_branch_in_workspace() -> anyhow::Result<()> {
1316
1297
insta:: assert_snapshot!( visualize_commit_graph( & repo, rewritten_head_id) ?, @r"
1317
1298
* 098effd (HEAD -> merge) Merge branch 'A' into merge
1318
1299
|\
1319
- | * 99f3a1c (s1-b/top, A ) remove 5 lines from beginning
1320
- | * 7f389ed (s1-b/below-top) add 10 to the beginning
1321
- * | 03e9b6f (s2-b/top, B ) remove 5 lines from the end
1322
- * | 91ef6f6 (s2-b/below-top) add 10 to the end
1300
+ | * 99f3a1c (s1-b/top) remove 5 lines from beginning
1301
+ | * 7f389ed (s1-b/below-top, A ) add 10 to the beginning
1302
+ * | 03e9b6f (s2-b/top) remove 5 lines from the end
1303
+ * | 91ef6f6 (s2-b/below-top, B ) add 10 to the end
1323
1304
|/
1324
1305
* ff045ef (main) init
1325
1306
" ) ;
0 commit comments