We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Lazygit crashes when invoked from the .git folder of a regular local Git repository.
Way to Reproduce it The following commands
$ cd /my/local/repository/ $ cd .git/ $ lazygit
result in the following error:
2024/04/20 23:57:12 An error occurred! Please create an issue at: https://github.com/jesseduffield/lazygit/issues *errors.errorString Error getting repo paths: 'git rev-parse --path-format=absolute --show-toplevel --absolute-git-dir --git-common-dir --show-superproject-working-tree' failed: fatal: this operation must be run in a work tree /home/federico/go/pkg/mod/github.com/jesseduffield/lazygit@v0.41.0/pkg/commands/git.go:65 (0x9a7fc9) NewGitCommand: return nil, errors.Errorf("Error getting repo paths: %v", err) /home/federico/go/pkg/mod/github.com/jesseduffield/lazygit@v0.41.0/pkg/gui/gui.go:300 (0xb312d5) (*Gui).onNewRepo: gui.git, err = commands.NewGitCommand( /home/federico/go/pkg/mod/github.com/jesseduffield/lazygit@v0.41.0/pkg/gui/gui.go:692 (0xb34078) (*Gui).Run: if err := gui.onNewRepo(startArgs, context.NO_CONTEXT); err != nil { /home/federico/go/pkg/mod/github.com/jesseduffield/lazygit@v0.41.0/pkg/gui/gui.go:711 (0xb34705) (*Gui).RunAndHandleError.func1: if err := gui.Run(startArgs); err != nil { /home/federico/go/pkg/mod/github.com/jesseduffield/lazygit@v0.41.0/pkg/utils/utils.go:117 (0x82837c) SafeWithError: err := f() /home/federico/go/pkg/mod/github.com/jesseduffield/lazygit@v0.41.0/pkg/gui/gui.go:710 (0xb3464e) (*Gui).RunAndHandleError: return utils.SafeWithError(func() error { /home/federico/go/pkg/mod/github.com/jesseduffield/lazygit@v0.41.0/pkg/app/app.go:266 (0xb62396) Run: err := app.Gui.RunAndHandleError(startArgs) /home/federico/go/pkg/mod/github.com/jesseduffield/lazygit@v0.41.0/pkg/app/app.go:49 (0xb62346) Run: err = app.Run(startArgs) /home/federico/go/pkg/mod/github.com/jesseduffield/lazygit@v0.41.0/pkg/app/entry_point.go:150 (0xb64565) Start: Run(appConfig, common, appTypes.NewStartArgs(cliArgs.FilterPath, parsedGitArg, integrationTest)) /home/federico/go/pkg/mod/github.com/jesseduffield/lazygit@v0.41.0/main.go:23 (0xb65d98) main: app.Start(ldFlagsBuildInfo, nil) /home/federico/.go/go1.22.1/src/runtime/internal/atomic/types.go:194 (0x44035d) (*Uint32).Load: return Load(&u.value) /home/federico/.go/go1.22.1/src/runtime/asm_amd64.s:1695 (0x473501) goexit: BYTE $0x90 // NOP
Expected behavior Clean exit with a clear error message (like "Error: must be run inside the main folder of a git repository")
Version info:
$ lazygit --version commit=, build date=, build source=unknown, version=unversioned, os=linux, arch=amd64, git version=2.34.1
$ git --version git version 2.34.1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Lazygit crashes when invoked from the .git folder of a regular local Git repository.
Way to Reproduce it
The following commands
result in the following error:
Expected behavior
Clean exit with a clear error message (like "Error: must be run inside the main folder of a git repository")
Version info:
The text was updated successfully, but these errors were encountered: