Skip to content

diff paths are confusing when using jj diff #863

@CobaltCause

Description

@CobaltCause

This issue is exactly the same as #620 except for jj rather than git, where leading directory components are not shown by difftastic. A case where this happens for me is when jj invokes difft like this:

INFO run_command:cmd_diff: jj_cli::merge_tools::external: Invoking the external diff generator: cmd=cd "/tmp/jj-diff-McWduD" && "difft" "--color=always" "left/crates/derail/src/report/buffer.rs" "right/crates/derail-report/src/buffer.rs"

(This issue can be worked around by not setting merge-tools.difft.diff-invocation-mode = "file-by-file" in jj's configuration, but this has the downside of handling renamed files by showing the original file as deleted and the replacement as though it were a completely new and unrelated file.)

Version info

$ difft --version
Difftastic 0.64.0

Toolchain: 1.87.0
System:    linux x86_64

On NixOS unstable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions