Panic when using 'exa --git' on a git directory with modified and staged submodule.
Here's the backtrace:
thread 'Result::unwrap() on an Err value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/jordan/.cargo/registry/src/github.com-1ecc6299db9ec823/exa-0.9.0/src/fs/feature/git.rs:271:22
stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
1: backtrace::backtrace::trace_unsynchronized
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src/libstd/sys_common/backtrace.rs:78
3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
at src/libstd/sys_common/backtrace.rs:59
4: core::fmt::write
at src/libcore/fmt/mod.rs:1076
5: std::io::Write::write_fmt
at src/libstd/io/mod.rs:1537
6: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:62
7: std::sys_common::backtrace::print
at src/libstd/sys_common/backtrace.rs:49
8: std::panicking::default_hook::{{closure}}
at src/libstd/panicking.rs:198
9: std::panicking::default_hook
at src/libstd/panicking.rs:217
10: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:526
11: rust_begin_unwind
at src/libstd/panicking.rs:437
12: core::panicking::panic_fmt
at src/libcore/panicking.rs:85
13: core::option::expect_none_failed
at src/libcore/option.rs:1269
14: exa::fs::feature::git::reorient
15: exa::fs::feature::git::Git::status
16: exa::output::table::Table::display
17: exa::output::table::Table::row_for_file
18: RUST_BACKTRACE=full for a verbose backtrace.
[1] 17210 abort (core dumped) exa --long --git --classify --group-directories-first
The issue doesn't seem related to the submodule -- a reset and clean resolved for me but I have seen this before as well. There seems to exist some state of a git repo which exa does not like.
Line numbers for me differ, but there's a known (and fixed but not released as far as I can see) issue with broken symlinks in git when using -l --git, maybe it's that?
I get this panic when i have a dangling symlink in the directory.
I'm running into the same problem with a git project using submodules:
RUST_BACKTRACE=full exa --long --git --all --header
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: SystemTimeError(6795364578.871345152s)', src/libcore/result.rs:1084:5
stack backtrace:
0: 0x103ce5ced - std::panicking::default_hook::{{closure}}::hffc69ca72fa98b80
1: 0x103ce57bc - std::panicking::rust_panic_with_hook::h058ef423beec40ce
2: 0x103ce5f7d - std::panicking::continue_panic_fmt::h0bb2cdb45a553955
3: 0x103ce6249 - rust_begin_unwind
4: 0x103d77dfa - core::panicking::panic_fmt::h2413d97d26203710
5: 0x103d78399 - core::result::unwrap_failed::hef33208e3f23e07a
6: 0x103cab6bd - exa::output::table::Table::display::h7d61868c2e1aa281
7: 0x103cbe955 - <F as scoped_threadpool::FnBox>::call_box::hfeff2cdcb76e7a57
8: 0x103cd6d6e - std::sys_common::backtrace::__rust_begin_short_backtrace::hf388fc36537a8fe9
9: 0x103cd789e - core::ops::function::FnOnce::call_once{{vtable.shim}}::hd49318dcebc5ef76
10: 0x103cf013d - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hf778f932793a5a82
11: 0x103cf0767 - std::sys::unix::thread::Thread::new::thread_start::ha4ccb7099fa6037f
12: 0x7fff2033e950 - _pthread_start
[1] 2991 abort RUST_BACKTRACE=full exa --long --git --all --header
@jpsalm This issue is the same as #526, and that it has been fixed in #584.
@jahio This has been fixed in #670.