Skip to content

Bare repo displays incorrect repo name and commit count #1063

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

Open
Neurognostic opened this issue Oct 30, 2020 · 0 comments
Open

Bare repo displays incorrect repo name and commit count #1063

Neurognostic opened this issue Oct 30, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@Neurognostic
Copy link

Neurognostic commented Oct 30, 2020

Describe the bug
In #1023 support for bare repositories was added. However when using a bare repo the Status does not display correctly.

  1. Instead of the repo name (as defined by --git-dir) being displayed the name of the --work-tree directory is used instead (my $HOME directory in this case).

  2. The count of how many commits ahead or behind of origin displays as ↑?↓? instead of the actual counts.

To Reproduce
Steps to reproduce the behavior:

  1. Create bare repo and remote
  2. Point lazygit to bare repo and work tree:
    lazygit --git-dir=$XDG_DATA_HOME/dotfiles --work-tree=$HOME

97665616-861a5080-1a41-11eb-8bb2-730c212f816f

Expected behavior
Status should use the name of --git-dir for repo name and correctly display the commit count.

Desktop:

  • OS: Linux
  • Lazygit Version: v0.23.6.7c1889cd
  • The last commit id if you built project from sources: 7c1889c

Additional context
Add any other context about the problem here.

I am trying to use lazygit for managing my dotfiles, similarly to this and #778.


Related question: Is there anyway to use lazygit to browse/edit tracked files in addition to changed/staged files? I think this functionality would make lazygit the perfect tool for managing dotfiles the bare repo way as you would be able to browse and edit only the files you care about directly from lazygit. Such as with git-ls-files(1) or git-ls-tree(1): Stack Overflow source

git ls-tree --full-tree -r --name-only HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant