@@ -4575,7 +4575,8 @@ fn test_move_fixup_head_into_parent() -> eyre::Result<()> {
45754575 ] ) ?;
45764576 insta:: assert_snapshot!( stdout, @r###"
45774577 Attempting rebase in-memory...
4578- [1/1] Amended as: 68aa706 create test2.txt
4578+ [1/2] Amended as: 68aa706 create test2.txt
4579+ [2/2] Skipped commit (was already applied upstream): 96d1c37 create test2.txt
45794580 branchless: processing 2 rewritten commits
45804581 branchless: running command: <git-executable> checkout 68aa7060ef38274a33c9a51dc6964de6e84fbd43
45814582 O f777ecc (master) create initial.txt
@@ -4622,29 +4623,20 @@ fn test_move_fixup_parent_into_head() -> eyre::Result<()> {
46224623 "### ) ;
46234624
46244625 // --on-disk
4625- // FIXME on disk is not working :(
4626- // {
4627- // let git = git.duplicate_repo()?;
4628- // git.run(&[
4629- // "move",
4630- // "--on-disk",
4631- // "--fixup",
4632- // "--debug-dump-rebase-plan",
4633- // "-x",
4634- // &test2_oid.to_string(),
4635- // "-d",
4636- // &"HEAD".to_string(),
4637- // ])?;
4638-
4639- // let (stdout, _stderr) = git.run(&["smartlog"])?;
4640- // insta::assert_snapshot!(stdout, @r###"
4641- // O f777ecc (master) create initial.txt
4642- // |
4643- // o 62fc20d create test1.txt
4644- // |
4645- // @ 68aa706 create test3.txt
4646- // "###);
4647- // }
4626+ {
4627+ let git = git. duplicate_repo ( ) ?;
4628+ let ( _stdout, _stderr) =
4629+ git. run ( & [ "move" , "--on-disk" , "--fixup" , "-x" , & test2_oid. to_string ( ) ] ) ?;
4630+
4631+ let ( stdout, _stderr) = git. run ( & [ "smartlog" ] ) ?;
4632+ insta:: assert_snapshot!( stdout, @r###"
4633+ O f777ecc (master) create initial.txt
4634+ |
4635+ o 62fc20d create test1.txt
4636+ |
4637+ @ 2565373 create test3.txt
4638+ "### ) ;
4639+ }
46484640
46494641 // --in-memory
46504642 {
@@ -4660,8 +4652,9 @@ fn test_move_fixup_parent_into_head() -> eyre::Result<()> {
46604652 // insta::assert_snapshot!(stderr, @r###""###);
46614653 insta:: assert_snapshot!( stdout, @r###"
46624654 Attempting rebase in-memory...
4663- [1/2] Committed as: 4838e49 create test3.txt
4664- [2/2] Amended as: 2565373 create test3.txt
4655+ [1/3] Committed as: 4838e49 create test3.txt
4656+ [2/3] Amended as: 2565373 create test3.txt
4657+ [3/3] Skipped commit (was already applied upstream): 70deb1e create test3.txt
46654658 branchless: processing 2 rewritten commits
46664659 branchless: running command: <git-executable> checkout 2565373efecda4dda6274ad5107dbff6be05f0a3
46674660 O f777ecc (master) create initial.txt
@@ -4704,29 +4697,25 @@ fn test_move_fixup_multiple_into_ancestor() -> eyre::Result<()> {
47044697 "### ) ;
47054698
47064699 // --on-disk
4707- // FIXME on disk is not working :(
4708- // {
4709- // let git = git.duplicate_repo()?;
4710- // git.run(&[
4711- // "move",
4712- // "--on-disk",
4713- // "--fixup",
4714- // "--debug-dump-rebase-plan",
4715- // "-x",
4716- // &test2_oid.to_string(),
4717- // "-d",
4718- // &"HEAD".to_string(),
4719- // ])?;
4720-
4721- // let (stdout, _stderr) = git.run(&["smartlog"])?;
4722- // insta::assert_snapshot!(stdout, @r###"
4723- // O f777ecc (master) create initial.txt
4724- // |
4725- // o 62fc20d create test1.txt
4726- // |
4727- // @ 68aa706 create test3.txt
4728- // "###);
4729- // }
4700+ {
4701+ let git = git. duplicate_repo ( ) ?;
4702+ git. run ( & [
4703+ "move" ,
4704+ "--on-disk" ,
4705+ "--fixup" ,
4706+ "-x" ,
4707+ "HEAD+HEAD~" ,
4708+ "-d" ,
4709+ & test1_oid. to_string ( ) ,
4710+ ] ) ?;
4711+
4712+ let ( stdout, _stderr) = git. run ( & [ "smartlog" ] ) ?;
4713+ insta:: assert_snapshot!( stdout, @r###"
4714+ O f777ecc (master) create initial.txt
4715+ |
4716+ @ 9ede80c create test1.txt
4717+ "### ) ;
4718+ }
47304719
47314720 // --in-memory
47324721 {
@@ -4785,29 +4774,16 @@ fn test_move_fixup_multiple_ancestors_into_head() -> eyre::Result<()> {
47854774 "### ) ;
47864775
47874776 // --on-disk
4788- // FIXME on disk is not working :(
4789- // {
4790- // let git = git.duplicate_repo()?;
4791- // git.run(&[
4792- // "move",
4793- // "--on-disk",
4794- // "--fixup",
4795- // "--debug-dump-rebase-plan",
4796- // "-x",
4797- // &test2_oid.to_string(),
4798- // "-d",
4799- // &"HEAD".to_string(),
4800- // ])?;
4801-
4802- // let (stdout, _stderr) = git.run(&["smartlog"])?;
4803- // insta::assert_snapshot!(stdout, @r###"
4804- // O f777ecc (master) create initial.txt
4805- // |
4806- // o 62fc20d create test1.txt
4807- // |
4808- // @ 68aa706 create test3.txt
4809- // "###);
4810- // }
4777+ {
4778+ let git = git. duplicate_repo ( ) ?;
4779+ git. run ( & [ "move" , "--on-disk" , "--fixup" , "-x" , "HEAD~+HEAD~2" ] ) ?;
4780+ let ( stdout, _stderr) = git. run ( & [ "smartlog" ] ) ?;
4781+ insta:: assert_snapshot!( stdout, @r###"
4782+ O f777ecc (master) create initial.txt
4783+ |
4784+ @ dbc9c34 create test3.txt
4785+ "### ) ;
4786+ }
48114787
48124788 // --in-memory
48134789 {
@@ -4873,33 +4849,32 @@ fn test_move_fixup_complicated() -> eyre::Result<()> {
48734849 "### ) ;
48744850
48754851 // --on-disk
4876- // FIXME on disk is not working :(
4877- // {
4878- // let git = git.duplicate_repo()?;
4879- // git.run(&[
4880- // "move",
4881- // "--on-disk",
4882- // "--fixup",
4883- // "-x",
4884- // &format!("{}+{}", test2_oid, test6_oid),
4885- // "-d",
4886- // &test4_oid.to_string(),
4887- // ])?;
4888- // let (stdout, _stderr) = git.run(&["smartlog"])?;
4889- // insta::assert_snapshot!(stdout, @r###"
4890- // O f777ecc (master) create initial.txt
4891- // |
4892- // o 62fc20d create test1.txt
4893- // |
4894- // o 4838e49 create test3.txt
4895- // |\
4896- // | o 9866190 create test4.txt
4897- // | |
4898- // | o a84ae82 create test5.txt
4899- // |
4900- // @ dd38f3d create test7.txt
4901- // "###);
4902- // }
4852+ {
4853+ let git = git. duplicate_repo ( ) ?;
4854+ git. run ( & [
4855+ "move" ,
4856+ "--on-disk" ,
4857+ "--fixup" ,
4858+ "-x" ,
4859+ & format ! ( "{}+{}" , test2_oid, test6_oid) ,
4860+ "-d" ,
4861+ & test4_oid. to_string ( ) ,
4862+ ] ) ?;
4863+ let ( stdout, _stderr) = git. run ( & [ "smartlog" ] ) ?;
4864+ insta:: assert_snapshot!( stdout, @r###"
4865+ O f777ecc (master) create initial.txt
4866+ |
4867+ o 62fc20d create test1.txt
4868+ |
4869+ o 4838e49 create test3.txt
4870+ |\
4871+ | o 9866190 create test4.txt
4872+ | |
4873+ | o a84ae82 create test5.txt
4874+ |
4875+ @ dd38f3d create test7.txt
4876+ "### ) ;
4877+ }
49034878
49044879 // --in-memory
49054880 {
0 commit comments