mirror of
https://github.com/martinvonz/jj.git
synced 2025-02-06 03:22:59 +00:00
test_git_colocated_fetch_deleted_branch
: Fix the test
Before, HEAD@git was at change `e1f4` mentioned in the test. So, as long as we
consider the behavior added in 20eb9ec
to be correct, that change should NOT
have been abandoned after the fetch, in spite of what the comment in the test
says. In other words, the test did NOT demonstrate a bug before this commit.
Now, the test properly demonstrates the bug.
Cc #864
This commit is contained in:
parent
46422c6502
commit
0a51c5fc2e
1 changed files with 9 additions and 6 deletions
|
@ -248,10 +248,12 @@ fn test_git_colocated_fetch_deleted_branch() {
|
|||
let clone_path = test_env.env_root().join("clone");
|
||||
git2::Repository::clone(origin_path.to_str().unwrap(), &clone_path).unwrap();
|
||||
test_env.jj_cmd_success(&clone_path, &["init", "--git-repo=."]);
|
||||
test_env.jj_cmd_success(&clone_path, &["new", "A"]);
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &clone_path), @r###"
|
||||
@ bc7d08e8de9b7bc248b9358a05e96f1671bbd4d9
|
||||
◉ e1f4268fabd2c84e880c5eb5bd87e076180fc8e3 B HEAD@git
|
||||
◉ a86754f975f953fa25da4265764adc0c62e9ce6b A master
|
||||
@ 1fa8b2e27c8c3da9764bda953dd81a06fb292d1a
|
||||
│ ◉ e1f4268fabd2c84e880c5eb5bd87e076180fc8e3 B
|
||||
├─╯
|
||||
◉ a86754f975f953fa25da4265764adc0c62e9ce6b A master HEAD@git
|
||||
◉ 0000000000000000000000000000000000000000
|
||||
"###);
|
||||
|
||||
|
@ -260,9 +262,10 @@ fn test_git_colocated_fetch_deleted_branch() {
|
|||
insta::assert_snapshot!(stdout, @"");
|
||||
// TODO: e1f4 should have been abandoned (#864)
|
||||
insta::assert_snapshot!(get_log_output(&test_env, &clone_path), @r###"
|
||||
@ bc7d08e8de9b7bc248b9358a05e96f1671bbd4d9
|
||||
◉ e1f4268fabd2c84e880c5eb5bd87e076180fc8e3 HEAD@git
|
||||
◉ a86754f975f953fa25da4265764adc0c62e9ce6b A master
|
||||
@ 1fa8b2e27c8c3da9764bda953dd81a06fb292d1a
|
||||
│ ◉ e1f4268fabd2c84e880c5eb5bd87e076180fc8e3
|
||||
├─╯
|
||||
◉ a86754f975f953fa25da4265764adc0c62e9ce6b A master HEAD@git
|
||||
◉ 0000000000000000000000000000000000000000
|
||||
"###);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue