Skip to content

Diff of a broken symlink gives: No such file #912

@ordishg

Description

@ordishg

Given a directory structure as follows

.
├── left
└── right
    └── b -> a

Where b is a (broken) symlink to a

Created with

  1. mkdir left right
  2. ln -s right/a right/b

Running difft left right prints to stderr

No such file: left/b
No such file: right/b

then exits with status 2.

I would expect difftastic to tell me that b is new and is a symlink to a.

It seems like the issue comes from difftastic following the symlink, which points to a file that doesn't exist, then believing that right/b doesn't exist.

The above scenario happens when creating a new symlink and then using difftastic as the diff tool. I originally reported the issue in jujutsu but I think it belongs here.

NixOS unstable
Difftastic 0.65.0

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