Open gg-kialo opened 1 month ago
please share the output you get when installing via binstall
Here's my binstall output.
❯ cargo binstall gitui@0.26.3 --force -y
INFO resolve: Resolving package: 'gitui@=0.26.3'
INFO resolve: Verified signature for package 'gitui-0.26.3-x86_64-unknown-linux-gnu': timestamp:1717378732 file:gitui-0.26.3-x86_64-unknown-linux-gnu.tar.gz hashed
WARN The package gitui v0.26.3 (x86_64-unknown-linux-gnu) has been downloaded from third-party source QuickInstall
INFO This will install the following binaries:
INFO - gitui (gitui -> /home/ggovan/.cargo/bin/gitui)
INFO Installing binaries...
INFO Done in 2.239927562s
binstall is v1.6.8
I can reproduce with Ubuntu 24.04 and am trying to find the root cause.
I can only reproduce using cargo binstall gitui@0.26.3 --force
, but not if I build from source using either cargo install --path . --locked
or cargo install --path .
I have the same problem, I've tried to run with strace:
newfstatat(AT_FDCWD, "/mnt/nearly2t/projects/rust/iggy/.git/config", {st_mode=S_IFREG|0664, st_size=367, ...}, 0) = 0
newfstatat(AT_FDCWD, "/home/zsombor/.gitconfig", {st_mode=S_IFREG|0664, st_size=134, ...}, 0) = 0
newfstatat(AT_FDCWD, "/mnt/nearly2t/projects/rust/iggy/.git/info/grafts", 0x7fff403dba10, 0) = -1 ENOENT (Nincs ilyen fájl vagy könyvtár)
write(2, "invalid path\nplease run gitui in"..., 66invalid path
please run gitui inside of a non-bare git repository
) = 66
sigaltstack({ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=8192}, NULL) = 0
munmap(0x703e978d7000, 12288) = 0
exit_group(0) = ?
After touch .git/info/grafts
I get:
newfstatat(AT_FDCWD, "/mnt/nearly2t/projects/rust/iggy/.git/info/grafts", {st_mode=S_IFREG|0664, st_size=0, ...}, 0) = 0
openat(AT_FDCWD, "/mnt/nearly2t/projects/rust/iggy/.git/info/grafts", O_RDONLY|O_CLOEXEC) = 3
close(3) = 0
newfstatat(AT_FDCWD, "/mnt/nearly2t/projects/rust/iggy/.git/shallow", 0x7fff6e9c3b10, 0) = -1 ENOENT (Nincs ilyen fájl vagy könyvtár)
write(2, "invalid path\nplease run gitui in"..., 66invalid path
please run gitui inside of a non-bare git repository
) = 66
sigaltstack({ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=8192}, NULL) = 0
munmap(0x72f6c5394000, 12288) = 0
exit_group(0) = ?
After touch .git/shallow
the app starts up.
Same problem if gitui@0.26.3
is install via cargo-binstall
, but works fine if installed with cargo install
(with or without --locked
).
I had a look at both cargo-binstall
’s as well as libgit2
’s source, but I didn’t spot anything that seemed obviously related to this issue. Since there is a workaround, my current recommendation would be to wait and see whether this continues to be an issue in the next version. If so, I think it makes sense to invest more time into finding the root cause.
I needed to execute
touch .git/info/grafts
git replace --convert-graft-file
to make gitui start again.
@hpodhaisky do you have any idea why that is? is there a way to fix that via a PR?
Sorry, I have no idea. I just looked at the strace output. Symptoms as described above: gitui failed after being updated with cargo binstall gitui
.
Describe the bug With gitui v0.26.3 installed with https://github.com/cargo-bins/cargo-binstall, I can't use gitui in any of my repositories. It fails with an error of:
when I turn on
--logging
the log reads:I have no issues with v0.26.2 installed with
cargo-binstall
or with v0.26.3 installed with cargo withoutbinstall
, built locally, or using the executable from the github release.To Reproduce Steps to reproduce the behavior:
cargo binstall gitui@0.26.3 --force
cd
into a repositorygitui
Expected behavior gitui to open normally.
Additional Information
Software version
gitui 0.26.3 (installed with cargo-binstall)
Operating system
Linux 6.5.0-28-generic (ubuntu 23.10)
Compile time information
Environment variables
Command-line