gitui icon indicating copy to clipboard operation
gitui copied to clipboard

safe.directory '*' is not accepted

Open laktak opened this issue 3 years ago • 1 comments

Describe the bug

git works on mounted directories if you use

git config --global --add safe.directory '*'

But gitui will throw an error:

invalid path
please run gitui inside of a non-bare git repository

I can work around the issue by using

git config --global --add safe.directory /mnt/...

but I have to do this for every directory.

To Reproduce Steps to reproduce the behavior:

  • run git config --global --add safe.directory '*'
  • go to a mounted directory
  • run git clone https://github.com/extrawurst/gitui
  • cd into gitui and run git status # this will work
  • run gitui # this will give an error

Expected behavior gitui should use the same options as git (if this is a problem of a dependency please let me know so I can report it there)

Context (please complete the following information):

  • arch
  • gitui 0.20.1 (from arch repos)

laktak avatar Aug 23 '22 11:08 laktak

that certainly needs to be reported in upstream: https://github.com/libgit2/libgit2

extrawurst avatar Aug 23 '22 11:08 extrawurst

This has been fixed upstream.

laktak avatar Feb 28 '23 13:02 laktak

waiting for git2-rs to cut a release for this: https://github.com/rust-lang/git2-rs/pull/935

extrawurst avatar Feb 28 '23 18:02 extrawurst

Appears to be ready?

laktak avatar May 16 '23 20:05 laktak

This appears to be fixed in the master branch, but the latest crates.io release still isn't fixed. For anyone still running into this issue try installing gitui from master:

cargo install --git https://github.com/extrawurst/gitui

Hpmason avatar Jun 20 '23 19:06 Hpmason

Can someone validate if this works now since 0.25 should contain the upstream feature now

extrawurst avatar Feb 27 '24 14:02 extrawurst

Yes, it works without problems, thank you!

laktak avatar Mar 29 '24 21:03 laktak