Skip to content

op show -p no longer shows most squashes/absorbs #7090

@mernen

Description

@mernen

Description

This is a regression in jj v0.31, caused by #6757. Many operations that op show -p used to successfully display as patches are now silent.

I don't fully understand #6757's patch; it seems to have improved some diffs while making others worse. Could it perhaps be the case to offer two different diffing algorithms? The new one seems particularly for making sense of absorb, and AIUI the proposed solution for a lack of absorb --dry-run, --no-commit-transaction (#2562), would still hinge on one being able to effectively diff operations.

Steps to Reproduce the Problem

  1. echo -e 'first\nsecond\nthird' > test-file
  2. jj new
  3. echo -e 'first!\nsecond\nthird' > test-file
  4. jj absorb
  5. jj op show -p

Expected Behavior

This is jj v0.30’s op output:

$ jj-v0.30 op show -p
b3bd1b213612 daniel@test.local 1 hour ago, lasted 2 milliseconds
absorb changes into 1 commits
args: jj absorb

Changed commits:
○  + mnyupwsq 3941a32d (empty) (no description set)
│ ○  - ynnrsvmq hidden 63dca7fc (no description set)
├─╯  diff --git a/test-file b/test-file
│    index ff6e6b1a50..f19baf15ab 100644
│    --- a/test-file
│    +++ b/test-file
│    @@ -1,3 +1,3 @@
│    -first
│    +first!
│     second
│     third
○  + plkwolvr 6ceb9a95 (no description set)
   - plkwolvr hidden 0d75477f (no description set)
   diff --git a/test-file b/test-file
   index ff6e6b1a50..f19baf15ab 100644
   --- a/test-file
   +++ b/test-file
   @@ -1,3 +1,3 @@
   -first
   +first!
    second
    third

Changed working copy default@:
+ mnyupwsq 3941a32d (empty) (no description set)
- ynnrsvmq hidden 63dca7fc (no description set)

Notice it shows file-level diffs.

Actual Behavior

jj v0.31’s op output:

$ jj op show -p
b3bd1b213612 daniel@test.local 1 hour ago, lasted 2 milliseconds
absorb changes into 1 commits
args: jj absorb

Changed commits:
○  + mnyupwsq 3941a32d (empty) (no description set)
○  + plkwolvr 6ceb9a95 (no description set)
   - plkwolvr hidden 0d75477f (no description set)
   - ynnrsvmq hidden 63dca7fc (no description set)

Changed working copy default@:
+ mnyupwsq 3941a32d (empty) (no description set)
- ynnrsvmq hidden 63dca7fc (no description set)

Notice no file diffs are presented, making understanding what absorb did much harder.

Specifications

  • Platform: macOS
  • Version: v0.31

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions