···371371 ◉ zzzzzzzzzzzz 000000000000
372372 "###);
373373 test_env.jj_cmd_success(&repo_path, &["undo"]);
374374- // TODO: There should be no divergence here; 2f376ea1478c should be hidden
375375- // (#922)
374374+ // There should be no divergence here; 2f376ea1478c should be hidden
376375 insta::assert_snapshot!(get_log_output_divergence(&test_env, &repo_path), @r###"
377377- ◉ qpvuntsmwlqt 2f376ea1478c A master !divergence!
378378- │ @ rlvkpnrzqnoo 8f71e3b6a3be
379379- │ ◉ qpvuntsmwlqt a86754f975f9 A HEAD@git !divergence!
380380- ├─╯
376376+ @ rlvkpnrzqnoo 8f71e3b6a3be
377377+ ◉ qpvuntsmwlqt a86754f975f9 A master HEAD@git
381378 ◉ zzzzzzzzzzzz 000000000000
382379 "###);
383380}
+4-5
tests/test_git_fetch.rs
···659659 "###);
660660 // Now try to fetch just one branch
661661 let stdout = test_env.jj_cmd_success(&target_jj_repo_path, &["git", "fetch", "--branch", "b"]);
662662- insta::assert_snapshot!(stdout, @"");
662662+ insta::assert_snapshot!(stdout, @r###"
663663+ Nothing changed.
664664+ "###);
663665 insta::assert_snapshot!(get_log_output(&test_env, &target_jj_repo_path), @r###"
664664- ◉ c7d4bdcbc215 descr_for_b b
665665- ◉ ff36dc55760e descr_for_trunk1
666666- │ @ 230dd059e1b0
667667- ├─╯
666666+ @ 230dd059e1b0
668667 ◉ 000000000000
669668 "###);
670669}
+13-16
tests/test_git_import_export.rs
···104104105105 // "git export" can't be undone.
106106 insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["op", "undo"]), @r###"
107107+ Nothing changed.
107108 "###);
108109 insta::assert_debug_snapshot!(get_git_refs(&git_repo), @r###"
109110 [
···118119119120 // This would re-export branch "a" as the internal state has been rolled back.
120121 // It might be better to preserve the state, and say "Nothing changed" here.
121121- insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["git", "export"]), @"");
122122+ insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["git", "export"]), @r###"
123123+ Nothing changed.
124124+ "###);
122125}
123126124127#[test]
···150153 insta::assert_snapshot!(get_branch_output(&test_env, &repo_path), @"");
151154152155 // Try "git import" again, which should re-import the branch "a".
153153- insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["git", "import"]), @"");
154154- insta::assert_snapshot!(get_branch_output(&test_env, &repo_path), @r###"
155155- a: 230dd059e1b0 (no description set)
156156+ insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["git", "import"]), @r###"
157157+ Nothing changed.
156158 "###);
159159+ insta::assert_snapshot!(get_branch_output(&test_env, &repo_path), @"");
157160}
158161159162#[test]
···208211209212 // The last branch "a" state is imported from git. No idea what's the most
210213 // intuitive result here.
211211- insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["git", "import"]), @"");
212212- insta::assert_snapshot!(get_branch_output(&test_env, &repo_path), @r###"
213213- a: 096dc80da670 (no description set)
214214+ insta::assert_snapshot!(test_env.jj_cmd_success(&repo_path, &["git", "import"]), @r###"
215215+ Nothing changed.
214216 "###);
217217+ insta::assert_snapshot!(get_branch_output(&test_env, &repo_path), @"");
215218}
216219217220#[test]
···230233 test_env.jj_cmd_success(&repo_path, &["undo"]);
231234 test_env.jj_cmd_success(&repo_path, &["describe", "-m", "v3"]);
232235 test_env.jj_cmd_success(&repo_path, &["git", "fetch"]);
233233- // TODO: This should probably not be considered a conflict. It currently is
234234- // because the undo made us forget that the remote was at v2, so the fetch
235235- // made us think it updated from v1 to v2 (instead of the no-op it could
236236- // have been).
236236+ // There should be no conflict
237237 insta::assert_snapshot!(get_branch_output(&test_env, &repo_path), @r###"
238238- main (conflicted):
239239- - 367d4f2f6deb v1
240240- + cb20e76758a0 v3
241241- + ebba8fecca7e v2
242242- @origin (behind by 1 commits): ebba8fecca7e v2
238238+ main: cb20e76758a0 v3
239239+ @origin (ahead by 1 commits, behind by 1 commits): 367d4f2f6deb v1
243240 "###);
244241}
245242