jesseduffield / jesseduffield/lazygit

No difference between pushed/not pushed commits in git bare repos

Open
#2,504 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**Bug description**
On git bare repos, lazygit shows all the commit hashes as pushed to the remote repo (green) even when they aren't

**To Reproduce**

1. Create a git bare repo
2. Launch Lazygit with a command similar to ``lazygit --git-dir=/your/git/dir/.git/ --work-tree=/your/git/dir``
3. Create a commit in local and don't push it to remote

**Expected behavior**
I would expect the commits not present in the remote branch to show their hash in red

**Screenshots**

This is how it looks in a regular repo without pushing
![image](https://user-images.githubusercontent.com/47090312/225278820-fd066e7a-8424-4397-8649-78a2de24daf9.png)
This is how it looks in a bare repo without pushing
![image](https://user-images.githubusercontent.com/47090312/225278527-97d6b2b9-56b5-457b-a3f8-5bb0f68bf2f1.png)

**Version info:**
Git: ``git version 2.39.2``
Lazygit: ``commit=v0.37.0, build date=2023-02-01T11:17:14Z, build source=binaryRelease, version=0.37.0, os=linux, arch=amd64, git version=2.39.2`` (from arch linux community)

**Additional context**
Not sure if this is a Git limitation. If it helps, this is the bare repo config
```
[core]
repositoryformatversion = 0
filemode = true
bare = true
[remote "origin"]
url = git@blablabla.git
[status]
showUntrackedFiles = no
[branch "master"]
remote = origin
merge = refs/heads/master
```

Also taking the opportunity to say that Lazygit is great! I use it daily

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.