Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Add new project" in a worktree fails due to not being able to read the objects directory. #3062

Closed
lf- opened this issue Mar 7, 2024 · 0 comments · Fixed by #3538
Closed

Comments

@lf-
Copy link

lf- commented Mar 7, 2024

Context: I am working on a fork of something that is deliberately worktree'd with its diverged upstream to make cherry-picks faster, and I am using worktree-specific configs on this particular worktree. I know that git-butler is an anti-worktree workflow; that's not what I'm using it for :)

Relevant log:

2024-03-07T06:55:27.971806Z  INFO gitbutler-app/src/main.rs:101: starting app version=0.10.22 name=GitButler
2024-03-07T06:55:28.264710Z  INFO get_user: gitbutler-app/src/users/commands.rs:23: close time.busy=13.0µs time.idle=19.7µs
2024-03-07T06:55:28.266643Z  INFO list_projects: gitbutler-app/src/projects/commands.rs:132: close time.busy=4.36µs time.idle=9.38µs
2024-03-07T06:55:38.918216Z ERROR add_project: gitbutler-app/src/projects/commands.rs:79: failed to add project error=failed to open repository

Caused by:
    path not found: /home/jade/dev/sekrit/.git/objects

Stack backtrace:
   0: <E as anyhow::context::ext::StdError>::ext_context
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/anyhow-1.0.80/src/context.rs:27:29
   1: anyhow::context::<impl anyhow::Context<T,E> for core::result::Result<T,E>>::context
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/anyhow-1.0.80/src/context.rs:54:31
   2: gitbutler_app::projects::controller::Controller::add
             at /home/runner/work/gitbutler/gitbutler/gitbutler-app/src/projects/controller.rs:93:9
   3: gitbutler_app::projects::commands::add_project::{{closure}}::{{closure}}
             at /home/runner/work/gitbutler/gitbutler/gitbutler-app/src/projects/commands.rs:92:5
   4: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9
   5: gitbutler_app::projects::commands::add_project::{{closure}}
             at /home/runner/work/gitbutler/gitbutler/gitbutler-app/src/projects/commands.rs:87:1
   6: <F as futures_core::future::TryFuture>::try_poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-core-0.3.30/src/future.rs:82:9
   7: <futures_util::future::try_future::into_future::IntoFuture<Fut> as core::future::future::Future>::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/future/try_future/into_future.rs:34:9
   8: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/future/future/map.rs:55:37
   9: <futures_util::future::future::Map<Fut,F> as core::future::future::Future>::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/lib.rs:91:13
  10: <futures_util::future::try_future::MapErr<Fut,F> as core::future::future::Future>::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/lib.rs:91:13
  11: <futures_util::future::try_future::ErrInto<Fut,E> as core::future::future::Future>::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/lib.rs:91:13
  12: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/future/future/map.rs:55:37
  13: <futures_util::future::future::Map<Fut,F> as core::future::future::Future>::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/lib.rs:91:13
  14: gitbutler_app::main::{{closure}}::{{closure}}::{{closure}}
             at /home/runner/work/gitbutler/gitbutler/gitbutler-app/src/projects/commands.rs:86:1
  15: tauri::hooks::InvokeResolver<R>::respond_async_serialized::{{closure}}
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-1.6.0/src/hooks.rs:204:33
  16: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9
  17: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/core.rs:328:17
  18: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/loom/std/unsafe_cell.rs:16:9
  19: tokio::runtime::task::core::Core<T,S>::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/core.rs:317:13
  20: tokio::runtime::task::harness::poll_future::{{closure}}
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/harness.rs:485:19
  21: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/core/src/panic/unwind_safe.rs:272:9
  22: std::panicking::try::do_call
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/std/src/panicking.rs:552:40
  23: std::panicking::try
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/std/src/panicking.rs:516:19
  24: std::panic::catch_unwind
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/std/src/panic.rs:142:14
  25: tokio::runtime::task::harness::poll_future
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/harness.rs:473:18
  26: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/harness.rs:208:27
  27: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/harness.rs:153:15
  28: tokio::runtime::task::raw::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/raw.rs:271:5
  29: tokio::runtime::task::raw::RawTask::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/raw.rs:201:18
  30: tokio::runtime::task::LocalNotified<S>::run
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/mod.rs:416:9
  31: tokio::runtime::scheduler::multi_thread::worker::Context::run_task::{{closure}}
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/multi_thread/worker.rs:576:13
  32: tokio::runtime::coop::with_budget
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/coop.rs:107:5
  33: tokio::runtime::coop::budget
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/coop.rs:73:5
  34: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/multi_thread/worker.rs:575:9
  35: tokio::runtime::scheduler::multi_thread::worker::Context::run
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/multi_thread/worker.rs:526:24
  36: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}::{{closure}}
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/multi_thread/worker.rs:491:21
  37: tokio::runtime::context::scoped::Scoped<T>::set
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/context/scoped.rs:40:9
  38: tokio::runtime::context::set_scheduler::{{closure}}
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/context.rs:176:26
  39: std::thread::local::LocalKey<T>::try_with
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/std/src/thread/local.rs:270:16
  40: std::thread::local::LocalKey<T>::with
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/std/src/thread/local.rs:246:9
  41: tokio::runtime::context::set_scheduler
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/context.rs:176:9
  42: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/multi_thread/worker.rs:486:9
  43: tokio::runtime::context::runtime::enter_runtime
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/context/runtime.rs:65:16
  44: tokio::runtime::scheduler::multi_thread::worker::run
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/multi_thread/worker.rs:478:5
  45: tokio::runtime::scheduler::multi_thread::worker::Launch::launch::{{closure}}
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/scheduler/multi_thread/worker.rs:447:45
  46: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/blocking/task.rs:42:21
  47: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9
  48: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/core.rs:328:17
  49: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/loom/std/unsafe_cell.rs:16:9
  50: tokio::runtime::task::core::Core<T,S>::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/core.rs:317:13
  51: tokio::runtime::task::harness::poll_future::{{closure}}
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/harness.rs:485:19
  52: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/core/src/panic/unwind_safe.rs:272:9
  53: std::panicking::try::do_call
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/std/src/panicking.rs:552:40
  54: std::panicking::try
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/std/src/panicking.rs:516:19
  55: std::panic::catch_unwind
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/std/src/panic.rs:142:14
  56: tokio::runtime::task::harness::poll_future
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/harness.rs:473:18
  57: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/harness.rs:208:27
  58: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/harness.rs:153:15
  59: tokio::runtime::task::raw::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/raw.rs:271:5
  60: tokio::runtime::task::raw::RawTask::poll
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/raw.rs:201:18
  61: tokio::runtime::task::UnownedTask<S>::run
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/task/mod.rs:453:9
  62: tokio::runtime::blocking::pool::Task::run
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/blocking/pool.rs:159:9
  63: tokio::runtime::blocking::pool::Inner::run
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/blocking/pool.rs:513:17
  64: tokio::runtime::blocking::pool::Spawner::spawn_thread::{{closure}}
             at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.36.0/src/runtime/blocking/pool.rs:471:13
  65: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/std/src/sys_common/backtrace.rs:155:18
  66: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/std/src/thread/mod.rs:529:17
  67: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/core/src/panic/unwind_safe.rs:272:9
  68: std::panicking::try::do_call
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/std/src/panicking.rs:552:40
  69: std::panicking::try
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/std/src/panicking.rs:516:19
  70: std::panic::catch_unwind
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/std/src/panic.rs:142:14
  71: std::thread::Builder::spawn_unchecked_::{{closure}}
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/std/src/thread/mod.rs:528:30
  72: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/core/src/ops/function.rs:250:5
  73: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/alloc/src/boxed.rs:2015:9
  74: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/alloc/src/boxed.rs:2015:9
  75: std::sys::unix::thread::Thread::new::thread_start
             at /rustc/503e129328080e924c0ddfca6abf4c2812580102/library/std/src/sys/unix/thread.rs:108:17
  76: <unknown>
  77: <unknown> path="/home/jade/dev/sekrit"
2024-03-07T06:55:39.053504Z  INFO add_project: gitbutler-app/src/projects/commands.rs:87: close time.busy=150ms time.idle=62.1µs path="/home/jade/dev/sekrit"
This was referenced Apr 12, 2024
Byron added a commit to Byron/gitbutler that referenced this issue Apr 17, 2024
Byron added a commit to Byron/gitbutler that referenced this issue Apr 17, 2024
gitbutlerapp#3062)

Note that this is a first step towards making worktree support possible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant