1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

Support bare worktrees where worktree does not have its own .git file

This was on oversight on my part: I assumed that the --work-tree arg was
always intended for use with linked worktrees which have a .git file
pointing back to the repo.

I'm honestly confused now: seems like there are three kinds of worktrees:
* the main worktree of a non-bare repo
* a linked worktree (with its own gitdir in the repo's worktrees/ dir)
* a random folder which you specify as a worktree with the --work-tree arg

I'm pretty sure the --work-tree arg is only intended to be used with this
third kind or workree
This commit is contained in:
Jesse Duffield
2023-08-07 22:08:12 +10:00
parent 0551f29de9
commit 595e28d335
6 changed files with 42 additions and 23 deletions

View File

@ -11,7 +11,7 @@ import (
var DotfileBareRepo = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Open lazygit in the worktree of a dotfile bare repo and add a file and commit",
ExtraCmdArgs: []string{"--git-dir={{.actualPath}}/.bare", "--work-tree={{.actualPath}}/repo"},
Skip: true,
Skip: false,
// passing this because we're explicitly passing --git-dir and --work-tree args
UseCustomPath: true,
SetupConfig: func(config *config.AppConfig) {},