-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: merge op heads and snapshot working copy by "op log" by default
This partially reverts 543036c "cli: run 'op log' without loading repo or merging concurrent ops." User can now get around the issue by --at-op=@ --ignore-working-copy.
- Loading branch information
Showing
5 changed files
with
33 additions
and
36 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
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 |
---|---|---|
|
@@ -30,22 +30,19 @@ fn test_concurrent_operation_divergence() { | |
&["describe", "-m", "message 2", "--at-op", "@-"], | ||
); | ||
|
||
// "--at-op=@" disables op heads merging | ||
let stderr = test_env.jj_cmd_failure(&repo_path, &["log", "--at-op=@"]); | ||
// "--at-op=@" disables op heads merging, and prints head operation ids. | ||
let stderr = test_env.jj_cmd_failure(&repo_path, &["op", "log", "--at-op=@"]); | ||
insta::assert_snapshot!(stderr, @r###" | ||
Error: The "@" expression resolved to more than one operation | ||
Hint: Try specifying one of the operations by ID: e31015019d90, 48f4a48f3f70 | ||
"###); | ||
|
||
// "op log" doesn't merge the concurrent operations | ||
let stdout = test_env.jj_cmd_success(&repo_path, &["op", "log"]); | ||
// "op log --at-op" should work without merging the head operations | ||
let stdout = test_env.jj_cmd_success(&repo_path, &["op", "log", "--at-op=48f4a48f3f70"]); | ||
insta::assert_snapshot!(stdout, @r###" | ||
○ 48f4a48f3f70 [email protected] 2001-02-03 04:05:09.000 +07:00 - 2001-02-03 04:05:09.000 +07:00 | ||
@ 48f4a48f3f70 [email protected] 2001-02-03 04:05:09.000 +07:00 - 2001-02-03 04:05:09.000 +07:00 | ||
│ describe commit 230dd059e1b059aefc0da06a2e5a7dbf22362f22 | ||
│ args: jj describe -m 'message 2' --at-op @- | ||
│ ○ e31015019d90 [email protected] 2001-02-03 04:05:08.000 +07:00 - 2001-02-03 04:05:08.000 +07:00 | ||
├─╯ describe commit 230dd059e1b059aefc0da06a2e5a7dbf22362f22 | ||
│ args: jj describe -m 'message 1' | ||
○ b51416386f26 [email protected] 2001-02-03 04:05:07.000 +07:00 - 2001-02-03 04:05:07.000 +07:00 | ||
│ add workspace 'default' | ||
○ 9a7d829846af [email protected] 2001-02-03 04:05:07.000 +07:00 - 2001-02-03 04:05:07.000 +07:00 | ||
|
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 |
---|---|---|
|
@@ -563,7 +563,7 @@ fn test_op_recover_from_bad_gc() { | |
"###); | ||
|
||
// "op log" should still be usable. | ||
let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["op", "log"]); | ||
let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["op", "log", "--ignore-working-copy"]); | ||
insta::assert_snapshot!(stdout, @r###" | ||
@ 43d51d9b0c0c [email protected] 2001-02-03 04:05:12.000 +07:00 - 2001-02-03 04:05:12.000 +07:00 | ||
│ describe commit 37bb762e5dc08073ec4323bdffc023a0f0cc901e | ||
|