Skip to content

but log fails with "Failed to create project from path: No project found with the given path" if in subdirectory of repository #10565

@klingenm

Description

@klingenm

Version

0.16.8

Operating System

macOS

Distribution Method

dmg (Mac OS - Apple Silicon)

Describe the issue

When navigating to a subdirectory of a gitbutler project, but stops working.

  • but log panics (see reproduce)
  • but status exits with status 0 but prints nothing
  • but oplog prints Error: No project found with the given path and exits with 1

other commands exits in the same ways as above.

How to reproduce (Optional)

  1. open subdirectory of GitButler enabled repository
  2. run but log
 RUST_BACKTRACE=full but log

thread 'main' panicked at crates/but/src/log/mod.rs:15:52:
Failed to create project from path: No project found with the given path

Stack backtrace:
   0: std::backtrace::Backtrace::capture
   1: gitbutler_project::project::Project::find_by_path
   2: but::log::commit_graph
   3: but::main::{{closure}}
   4: but::main
   5: std::sys::backtrace::__rust_begin_short_backtrace
   6: _main
stack backtrace:
   0:        0x10286b3d8 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h131ea56ed63e0132
   1:        0x10238fc08 - core::fmt::write::haa6dd13fe78ec4d8
   2:        0x10286a4f8 - std::io::Write::write_fmt::h4d9961c6014d147b
   3:        0x10286b298 - std::sys::backtrace::BacktraceLock::print::hd9c8cad8a28e4439
   4:        0x10286a128 - std::panicking::rust_panic_with_hook::h8625bb980bd8ff09
   5:        0x102897b64 - std::panicking::begin_panic_handler::{{closure}}::h70acf50b3508e764
   6:        0x102897ad4 - std::sys::backtrace::__rust_end_short_backtrace::h96123fd53d7cd657
   7:        0x10289ac6c - __rustc[afa139e1d232269f]::rust_begin_unwind
   8:        0x102c29fe0 - core::panicking::panic_fmt::h4b98a0ddb573744a
   9:        0x102c2a39c - core::result::unwrap_failed::heac0313dec6e18e2
  10:        0x10215a75c - but::log::commit_graph::hfbf16e8b78407afe
  11:        0x102195e20 - but::main::{{closure}}::hc7a4fa02139b0f43
  12:        0x10218a41c - but::main::h16b8ab9e00a067ef
  13:        0x1020e934c - std::sys::backtrace::__rust_begin_short_backtrace::h9240b65908cb16a4
  14:        0x10219dd74 - _main

Expected behavior (Optional)

  1. it resolves the git repository like git

Relevant log output (Optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working🎉reproduced🎉The issue could be reproduced by following the instructions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions