Skip to content

Panic: regex string should be pre-tested #71

@jtran

Description

@jtran

I ran git dive some/path.js, and I got this error.

I didn't see another issue like this. Also, CONTRIBUTING.md links to pages that are 404 under the Reproducing Bugs section.

name = "git-dive"
operating_system = "Mac OS 12.6.3 [64-bit]"
crate_version = "0.1.4"
explanation = """
Panic occurred in file '/Users/username/.cargo/registry/src/github.com-1ecc6299db9ec823/syntect-5.0.0/src/parsing/regex.rs' at line 69
"""
cause = 'regex string should be pre-tested: InvalidEscape("\\g")'
method = "Panic"
backtrace = """

   0: 0x100ec91ac - core::panicking::panic_fmt::hc1e7b11add95109d
                at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/panicking.rs:64
   1: 0x100ec94e4 - core::result::unwrap_failed::ha64769ab43736478
                at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/result.rs:1790
   2: 0x100dc3754 - once_cell::imp::OnceCell<T>::initialize::{{closure}}::hd160a7b43ae47aca
   3: 0x100e7cc88 - once_cell::imp::initialize_or_wait::h4bf1cb0769eecfc6
   4: 0x100ec29e0 - once_cell::imp::OnceCell<T>::initialize::hfa0ecea66c21dd66
   5: 0x100db9c1c - syntect::parsing::parser::ParseState::parse_line::h67de369ea7193e18
   6: 0x100dbfc84 - syntect::easy::HighlightLines::highlight_line::hf107f86ea5a37c78
   7: 0x100ce32fc - git_dive::blame::Highlighter::highlight_line::h5615ad5bcf46457f
   8: 0x100ce1970 - git_dive::blame::blame::hf39c7be23b699d5e
   9: 0x100cdd0ac - git_dive::run::he7b58947217cc271
  10: 0x100cdbad8 - git_dive::main::hbc47442bdfbf0b39
  11: 0x100cbe68c - std::sys_common::backtrace::__rust_begin_short_backtrace::h8f8aee8f71355006
  12: 0x100cc203c - std::rt::lang_start::{{closure}}::h36056f8a7137c93b
  13: 0x100e93b3c - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h602b6f29451c74c7
                at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/core/src/ops/function.rs:287
                 - std::panicking::try::do_call::h8ad76c1527a3892b
                at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:483
                 - std::panicking::try::hbfc990f7ac38d34c
                at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:447
                 - std::panic::catch_unwind::h936bb5789e0b4241
                at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panic.rs:140
                 - std::rt::lang_start_internal::{{closure}}::h896fa40a3ab062d0
                at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/rt.rs:148
                 - std::panicking::try::do_call::h21fb8583a42bdaac
                at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:483
                 - std::panicking::try::h90121103ee57470a
                at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panicking.rs:447
                 - std::panic::catch_unwind::hfd5c7b5d06b8f149
                at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/panic.rs:140
                 - std::rt::lang_start_internal::h9f0566e553deb11e
                at /rustc/2c8cc343237b8f7d5a3c3703e3a87f2eb2c54a74/library/std/src/rt.rs:148
  14: 0x100cdd694 - _main"""

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions