ogham / exa

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

--git does nothing if git config file has a multi-line value #1216

Open haizaar opened 1 year ago

haizaar commented 1 year ago

I'm using exa v0.10.1 with git on NixOS 23.05 amd64:

❯ exa -v
exa - list files on the command-line
v0.10.1 [+git]
https://the.exa.website/

However it doesn't display any git statuses. Running strace I can see it inspects local .git dir as well as user/glocal git config files but still no output comes up. Any ideas?

image

eggbean commented 1 year ago

I don't think it's the nix package, as I'm using 23.05 (amd64) as well and --git works fine. The unstable channel build is built from more recent commits, so has this issue.

haizaar commented 1 year ago

@eggbean can you please share how you invoke exa?

eggbean commented 1 year ago

I alias ls to this wrapper script, but it also works directly:

image

haizaar commented 1 year ago

Thank you. I did further tests and noticed it's working when run in clean environment. So after bisecting, I found that if HOME variable is set, then git status is not shown :thinking:. I'm quite puzzled now...

Any ideas besides wrapping it to drop HOME on the package level?

image

haizaar commented 1 year ago

Turns out the problem is with the multi-line config values in git config files. My git configuration files include definitions of delta them like here and these multi line values break exa --git, despite being officially supported by git

ariasuni commented 10 months ago

This is weird, it may be an issue in libgit2… Does this happens with the active fork eza?