ogham / exa

A modern replacement for ‘ls’.
https://the.exa.website/
MIT License
23.51k stars 660 forks source link

New softlinks are not shown in git status column if softlink points to a file outside the directory #1173

Closed reegnz closed 11 months ago

reegnz commented 1 year ago

Reproduce:

touch z
mkdir exa-bug
cd exa-bug
git init
touch x
ln -s y ../z
git add x y

git status output:

❯ git status
On branch master

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)
    new file:   x
    new file:   y

exa output:

❯ exa -lah --group-directories-first --git
Permissions Size User        Date Modified Git Name
drwxr-xr-x@    - reegnz 21 Mar 11:29   -- .git
.rw-r--r--@    0 reegnz 21 Mar 11:27   N- x
lrwxr-xr-x@    4 reegnz 21 Mar 11:29   -- y -> ../z

Note the missing N for the softlink called y. Git shows it and I staged it with git, but exa fails to show it as a new file in git. In the above example the file is also outside the repo, but this is not a necessity: The display of the 'new' info also fails if the softlink points to a file in the repo, but outside the directory (eg higher up inside the repo).

ariasuni commented 11 months ago

Closing this since exa is unmaintained (see https://github.com/ogham/exa/issues/1243), and a similar issue has been open for the active fork eza. Thanks!

(see https://github.com/eza-community/eza/issues/294)