11use anyhow:: { Result , bail} ;
2- use but_rebase:: graph_rebase:: cherry_pick:: {
3- CherryPickOutcome , PickSignGuard , PickSignMode , cherry_pick,
4- } ;
2+ use but_core:: commit:: SignCommit ;
3+ use but_rebase:: graph_rebase:: cherry_pick:: { CherryPickOutcome , PickDecisionMode , cherry_pick} ;
54use but_testsupport:: { visualize_commit_graph_all, visualize_tree} ;
65use gix:: prelude:: ObjectIdExt ;
76
@@ -27,7 +26,7 @@ fn basic_cherry_pick_clean() -> Result<()> {
2726 & repo,
2827 target,
2928 & [ onto] ,
30- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
29+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
3130 ) ?;
3231
3332 insta:: assert_debug_snapshot!( result, @"
@@ -63,7 +62,7 @@ fn basic_cherry_pick_cp_conflicts() -> Result<()> {
6362 & repo,
6463 target,
6564 & [ onto] ,
66- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
65+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
6766 ) ?;
6867
6968 insta:: assert_debug_snapshot!( result, @"
@@ -112,7 +111,7 @@ fn basic_cherry_pick_identity() -> Result<()> {
112111 & repo,
113112 target. detach ( ) ,
114113 & parents,
115- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
114+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
116115 ) ?;
117116
118117 insta:: assert_debug_snapshot!( result, @"
@@ -136,7 +135,7 @@ fn single_parent_to_multiple_parents_clean() -> Result<()> {
136135 & repo,
137136 target,
138137 & [ onto, onto2] ,
139- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
138+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
140139 ) ?;
141140
142141 insta:: assert_debug_snapshot!( result, @"
@@ -175,7 +174,7 @@ fn single_parent_to_multiple_parents_cp_conflicts() -> Result<()> {
175174 & repo,
176175 target,
177176 & [ onto, onto2] ,
178- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
177+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
179178 ) ?;
180179
181180 insta:: assert_debug_snapshot!( result, @"
@@ -230,7 +229,7 @@ fn single_parent_to_multiple_parents_parents_conflict() -> Result<()> {
230229 & repo,
231230 target,
232231 & [ onto, onto2] ,
233- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
232+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
234233 ) ?;
235234
236235 insta:: assert_debug_snapshot!( result, @"
@@ -262,7 +261,7 @@ fn multiple_parents_to_single_parent_clean() -> Result<()> {
262261 & repo,
263262 target,
264263 & [ onto] ,
265- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
264+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
266265 ) ?;
267266
268267 insta:: assert_debug_snapshot!( result, @"
@@ -299,7 +298,7 @@ fn multiple_parents_to_single_parent_cp_conflicts() -> Result<()> {
299298 & repo,
300299 target,
301300 & [ onto] ,
302- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
301+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
303302 ) ?;
304303
305304 insta:: assert_debug_snapshot!( result, @"
@@ -354,7 +353,7 @@ fn multiple_parents_to_single_parent_parents_conflict() -> Result<()> {
354353 & repo,
355354 target,
356355 & [ onto] ,
357- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
356+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
358357 ) ?;
359358
360359 insta:: assert_debug_snapshot!( result, @"
@@ -387,7 +386,7 @@ fn multiple_parents_to_multiple_parents_clean() -> Result<()> {
387386 & repo,
388387 target,
389388 & [ onto, onto2] ,
390- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
389+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
391390 ) ?;
392391
393392 insta:: assert_debug_snapshot!( result, @"
@@ -426,7 +425,7 @@ fn multiple_parents_to_multiple_parents_cp_conflicts() -> Result<()> {
426425 & repo,
427426 target,
428427 & [ onto, onto2] ,
429- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
428+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
430429 ) ?;
431430
432431 insta:: assert_debug_snapshot!( result, @"
@@ -485,7 +484,7 @@ fn multiple_parents_to_multiple_parents_base_parents_conflict() -> Result<()> {
485484 & repo,
486485 target,
487486 & [ onto, onto2] ,
488- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
487+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
489488 ) ?;
490489
491490 insta:: assert_debug_snapshot!( result, @"
@@ -517,7 +516,7 @@ fn multiple_parents_to_multiple_parents_target_parents_conflict() -> Result<()>
517516 & repo,
518517 target,
519518 & [ onto, onto2] ,
520- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
519+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
521520 ) ?;
522521
523522 insta:: assert_debug_snapshot!( result, @"
@@ -549,7 +548,7 @@ fn multiple_parents_to_multiple_parents_identity() -> Result<()> {
549548 & repo,
550549 target. detach ( ) ,
551550 & parents,
552- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
551+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
553552 ) ?;
554553
555554 insta:: assert_debug_snapshot!( result, @"
@@ -572,7 +571,7 @@ fn no_parents_identity() -> Result<()> {
572571 & repo,
573572 target. detach ( ) ,
574573 & [ ] ,
575- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
574+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
576575 ) ?;
577576
578577 insta:: assert_debug_snapshot!( result, @"
@@ -595,7 +594,7 @@ fn single_parent_to_no_parents_clean() -> Result<()> {
595594 & repo,
596595 target,
597596 & [ ] ,
598- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
597+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
599598 ) ?;
600599
601600 insta:: assert_debug_snapshot!( result, @"
@@ -630,7 +629,7 @@ fn no_parents_to_single_parent_clean() -> Result<()> {
630629 & repo,
631630 target,
632631 & [ onto] ,
633- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
632+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
634633 ) ?;
635634
636635 insta:: assert_debug_snapshot!( result, @"
@@ -666,7 +665,7 @@ fn no_parents_to_single_parent_cp_conflicts() -> Result<()> {
666665 & repo,
667666 target,
668667 & [ onto] ,
669- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
668+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
670669 ) ?;
671670
672671 insta:: assert_debug_snapshot!( result, @"
@@ -715,7 +714,7 @@ fn cherry_pick_back_to_original_parents_unconflicts() -> Result<()> {
715714 & repo,
716715 target. detach ( ) ,
717716 & [ onto, onto2] ,
718- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
717+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
719718 ) ?;
720719
721720 insta:: assert_debug_snapshot!( result, @"
@@ -734,7 +733,7 @@ fn cherry_pick_back_to_original_parents_unconflicts() -> Result<()> {
734733 & repo,
735734 id,
736735 & parents,
737- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
736+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
738737 ) ?;
739738
740739 insta:: assert_debug_snapshot!( result, @"
@@ -784,7 +783,7 @@ fn cherry_pick_recursive_merge() -> Result<()> {
784783 & repo,
785784 target. detach ( ) ,
786785 & [ onto, onto2, onto3] ,
787- PickSignMode :: IfChanged ( PickSignGuard :: IfSignCommitsEnabled ) ,
786+ PickDecisionMode :: IfChanged ( SignCommit :: IfSignCommitsEnabled ) ,
788787 ) ?;
789788
790789 insta:: assert_debug_snapshot!( result, @"
0 commit comments