Skip to content

GitUI panics in RemoteList with no remotes configured ("git: inconclusive remotes")Β #2869

@Yi2255

Description

@Yi2255

Describe the bug
GitUI exits with an error in a newly initialized repo when triggering pull-related action with ambiguous/incomplete remote setup.

Observed error:
Error: git: inconclusive remotes

To Reproduce
Steps to reproduce the behavior:

  1. Create a clean repo:
    mkdir -p /i4/gitui_crash1
    cd /i4/gitui_crash1
    git init
  2. Start GitUI:
    gitui
  3. Press keys:
    2
    p
  4. See error and exit/backtrace.
    panicked at /i4/gitui/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/gitui-0.28.0/src/popups/remotelist.rs:460:30:
    index out of bounds: the len is 0 but the index is 0

trace:
0: gitui::set_panic_handler::{{closure}}
1: std::panicking::panic_with_hook
2: std::panicking::panic_handler::{{closure}}
3: std::sys::backtrace::__rust_end_short_backtrace
4: __rustc::rust_begin_unwind
5: core::panicking::panic_fmt
6: core::panicking::panic_bounds_check
7: <alloc::vec::Vec<T,A> as core::ops::index::Index>::index
8: <gitui::popups::remotelist::RemoteListPopup as gitui::components::Component>::event
9: gitui::components::event_pump
10: gitui::run_app
11: gitui::main
12: std::sys::backtrace::__rust_begin_short_backtrace
13: main
14: __libc_start_call_main
at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
15: __libc_start_main_impl
at ./csu/../csu/libc-start.c:360:3
16: _start

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions