Describe the bug
I am using SHA-256 commit hashes on a repo (created with git init --object-format=sha256). In it, lazygit continues to work fine, but when I try to diff individual files of the initial commit, the window is empty.
To Reproduce
Steps to reproduce the behavior:
-
Create a SHA-256 repo with git init --object-format=sha256
-
Add and commit any file
-
Go to [4] Commits > select the commit > press Enter to enter diff view
-
No files are shown, as if the commit is empty
-
Add and commit another file
-
Go to [4] Commits > select the latest commit > press Enter to enter diff view
-
Everything is fine
-
Initial commit is still broken
Expected behavior
The committed files are shown
Screenshots
|
|
 |
 |
| Commit list view: diff shows file in commit |
pressed Enter: commit appears empty |
Version info:
commit=, build date=, build source=Homebrew, version=0.60.0, os=darwin, arch=arm64, git version=2.53.0
Terminal info:
iTerm2 Build 3.6.8
zsh 5.9 (arm-apple-darwin24.2.0)
Additional context
Initial commit sha: ba741fcd02b3cd42187ee46d4bdbfed10bf8fdbb15ccf739cb9ce583aefe5cae
When pressing Enter, the following gets logged:
Mar 18 09:13:50 |DEBU| RunCommand command="git -c diff.noprefix=false diff --submodule --no-ext-diff --name-status -z --no-renames 4b825dc642cb6eb9a060e54bf8d69288fbee4904 ba741fcd02b3cd42187ee46d4bdbfed10bf8fdbb15ccf739cb9ce583aefe5cae"
Mar 18 09:13:50 |ERRO| fatal: ambiguous argument '4b825dc642cb6eb9a060e54bf8d69288fbee4904': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
I don't know where it takes the 4b825dc642cb6eb9a060e54bf8d69288fbee4904 from; there is no such object inside .git
Describe the bug
I am using SHA-256 commit hashes on a repo (created with
git init --object-format=sha256). In it, lazygit continues to work fine, but when I try to diff individual files of the initial commit, the window is empty.To Reproduce
Steps to reproduce the behavior:
Create a SHA-256 repo with
git init --object-format=sha256Add and commit any file
Go to
[4] Commits> select the commit > press Enter to enter diff viewNo files are shown, as if the commit is empty
Add and commit another file
Go to
[4] Commits> select the latest commit > press Enter to enter diff viewEverything is fine
Initial commit is still broken
Expected behavior
The committed files are shown
Screenshots
Version info:
Terminal info:
iTerm2 Build 3.6.8
zsh 5.9 (arm-apple-darwin24.2.0)
Additional context
Initial commit sha:
ba741fcd02b3cd42187ee46d4bdbfed10bf8fdbb15ccf739cb9ce583aefe5caeWhen pressing Enter, the following gets logged:
I don't know where it takes the
4b825dc642cb6eb9a060e54bf8d69288fbee4904from; there is no such object inside.git