-
-
Notifications
You must be signed in to change notification settings - Fork 607
Panics on bare repositories #100
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
Comments
Hi @etrianag thanks for your interest in |
should print this now:
|
Normally, I don't use bare repos, but by chance, the most recent repository I used, was a bare repo, because I was setting it to handle my dotfiles, and today a found this program, and giving my first try, it was natural to test in my last repo, so I discovered the problem. Just reported to improve gitui. An off topic question: It would be useful to add a cli option like -v, to see the version, ie: "gitui -v". Or maybe "gitui --help" to show usage. (I don't know if creating issues for simple things, like this question, is good or not for the project). Thanks for responding so quickly, and congratulations by this project. |
regarding the wording, you are right, I will rephrase it👍 the version command line arg is actually in master already (since of #88) and will roll out in the next release:
|
Could we reopen this issue as a feature request and at least keep it in the backlog? I store my dotfiles in a git bare repository, and many of my friends do as well. Lazygit already has this feature and it's pretty much the only thing that keeps me from switching to Gitui as my default. Using lazygit for my dotfiles was actually how I got comfortable with lazygit and began testing and learning about some of the more advanced functionality. It really improved my understanding and knowledge of lazygit and git as a whole. Interaction with git bare repositories would give Gitui more feature parity and open it up as a way for others like me to practice and get used to the tool with their dotfiles before using it in production. |
Well this ticket is part of the backlog :) |
@JacobTravers Thanks for the Lazygit 👍 I played with it for few minutes and seems it matches my needs regarding bare repos. I'm not a big fan of Go, but functionality comes first. |
I am trying to use git as a no-sql local database. Support to this feature is going to be a critical decision in choosing the git client. Could I request for this feature and if a tentative timeline can be provided, please? |
Bare Repos are often used Tonfall dotfiles. |
i am Open for contributions. For the time being, Lazygit provides this: #100 (comment) |
If anybody is interested in trying to implement this, here is the relevant commit in lazygit where support for bare-repos was added. It might be worthwhile for a general idea of the sort of changes gitui may need. |
I looked into this a couple days ago: I commented out the two checks for bare repositories (here and here), tried it with my dotfiles repo and a bare copy of gitui, and it worked fine (no panics or program-ending errors). For my dotfiles it picked up the correct worktree and I could add/remove/commit files just fine. It worked regardless of whether or not For the bare repo with no worktree, the Status/Stashing screens were stuck at "Loading ..." but the Log and Files screens worked fine. I looked for the origin of the "bare repo" error/panic, and it looks like it's been there from the second commit in the repository. @extrawurst do you happen to remember why that check was added? At that point it looks like the The libgit2 implementation of the Providing the worktree/workdir directly through git2-rs with I'm willing to work on the issue, but I'd like to clear up a couple of things:
|
Yeah I was wondering the same, I have a local change set half way converting the entire code base to accept a more complex type that lets us specify not only the git folder but also the work tree folder. |
probably disabling those parts and showing clear message overlays that the status area is not usable in bare repos without workspace |
if that’s a thing we can easily support it I think |
It’s tracked here now: #1026 |
The eagle has landed. please give the new bare repo feature a spin (including the new |
Describe the bug
Unable to execute gitui inside a bare repo.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
May be a message: Sorry no support for bare repos
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: