-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copy-tracking: Add copy tracking as a post iteration step
- force each diff command to explicitly enable copy tracking - enable copy tracking in diff_summary - post-process for diff iterator - post-process for diff stream - update changelog
- Loading branch information
Showing
5 changed files
with
329 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,9 +67,8 @@ fn test_diff_basic() { | |
|
||
let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "-s"]); | ||
insta::assert_snapshot!(stdout, @r###" | ||
D file1 | ||
R file1 => file3 | ||
M file2 | ||
A file3 | ||
"###); | ||
|
||
let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "--types"]); | ||
|
@@ -161,9 +160,8 @@ fn test_diff_basic() { | |
|
||
let stdout = test_env.jj_cmd_success(&repo_path, &["diff", "-s", "--git"]); | ||
insta::assert_snapshot!(stdout, @r###" | ||
D file1 | ||
R file1 => file3 | ||
M file2 | ||
A file3 | ||
diff --git a/file1 b/file1 | ||
deleted file mode 100644 | ||
index 257cc5642c..0000000000 | ||
|
@@ -218,9 +216,8 @@ fn test_diff_basic() { | |
], | ||
); | ||
insta::assert_snapshot!(stdout.replace('\\', "/"), @r###" | ||
D repo/file1 | ||
R repo/file1 => repo/file3 | ||
M repo/file2 | ||
A repo/file3 | ||
"###); | ||
insta::assert_snapshot!(stderr.replace('\\', "/"), @r###" | ||
Warning: No matching entries for paths: repo/x, repo/y/z | ||
|
@@ -1253,12 +1250,12 @@ fn test_diff_external_file_by_file_tool() { | |
test_env.jj_cmd_ok(test_env.env_root(), &["git", "init", "repo"]); | ||
let repo_path = test_env.env_root().join("repo"); | ||
|
||
std::fs::write(repo_path.join("file1"), "foo\n").unwrap(); | ||
std::fs::write(repo_path.join("file2"), "foo\n").unwrap(); | ||
std::fs::write(repo_path.join("file1"), "file1\n").unwrap(); | ||
std::fs::write(repo_path.join("file2"), "file2\n").unwrap(); | ||
test_env.jj_cmd_ok(&repo_path, &["new"]); | ||
std::fs::remove_file(repo_path.join("file1")).unwrap(); | ||
std::fs::write(repo_path.join("file2"), "foo\nbar\n").unwrap(); | ||
std::fs::write(repo_path.join("file3"), "foo\n").unwrap(); | ||
std::fs::write(repo_path.join("file2"), "file2\nfile2\n").unwrap(); | ||
std::fs::write(repo_path.join("file3"), "file3\n").unwrap(); | ||
|
||
let edit_script = test_env.set_up_fake_diff_editor(); | ||
std::fs::write( | ||
|
@@ -1299,7 +1296,7 @@ fn test_diff_external_file_by_file_tool() { | |
|
||
insta::assert_snapshot!( | ||
test_env.jj_cmd_success(&repo_path, &["log", "-p", config]), @r###" | ||
@ rlvkpnrz [email protected] 2001-02-03 08:05:09 39d9055d | ||
@ rlvkpnrz [email protected] 2001-02-03 08:05:09 f12f62fb | ||
│ (no description set) | ||
│ == | ||
│ file1 | ||
|
@@ -1313,7 +1310,7 @@ fn test_diff_external_file_by_file_tool() { | |
│ file3 | ||
│ -- | ||
│ file3 | ||
○ qpvuntsm [email protected] 2001-02-03 08:05:08 0ad4ef22 | ||
○ qpvuntsm [email protected] 2001-02-03 08:05:08 6e485984 | ||
│ (no description set) | ||
│ == | ||
│ file1 | ||
|
@@ -1328,7 +1325,7 @@ fn test_diff_external_file_by_file_tool() { | |
|
||
insta::assert_snapshot!( | ||
test_env.jj_cmd_success(&repo_path, &["show", config]), @r###" | ||
Commit ID: 39d9055d70873099fd924b9af218289d5663eac8 | ||
Commit ID: f12f62fb1d73629c1b44abd4d5bbb500d7f8b86c | ||
Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp | ||
Author: Test User <[email protected]> (2001-02-03 08:05:09) | ||
Committer: Test User <[email protected]> (2001-02-03 08:05:09) | ||
|
Oops, something went wrong.