jesseduffield.lazygit/pkg/commands
Stefan Haller 568a4276d7 Pin the cached git config's commands to the repo directory
The cached git config runs its `git config` reads through raw
exec.Command calls, outside the pinned git command builder, so they
followed the process working directory. A cache miss on a stale
instance — one still in use by a refresh that crossed a repo switch —
would therefore read the new repo's local config while computing data
for the old one. Give the cache a directory, set once by NewGitCommand
right after it determines the repo paths (the object is created fresh
for every repo switch, so no cross-repo cache invalidation is needed),
and run every config command there.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 17:07:39 +02:00
..
direnv Offer direnv .envrc approval from inside lazygit 2026-06-04 09:05:01 +02:00
git_commands Resolve the refresh's file reads against its repo root 2026-07-20 17:07:39 +02:00
git_config Pin the cached git config's commands to the repo directory 2026-07-20 17:07:39 +02:00
hosting_service Optimize regex compilations 2026-05-10 15:28:14 +02:00
models Show renamed files in the custom patch builder 2026-07-04 13:05:09 +02:00
oscommands Wait for the streamed command's output goroutine before reading its buffers 2026-07-17 12:19:14 +02:00
patch Guard the patch builder against concurrent access 2026-07-17 12:35:54 +02:00
testdata Support opening lazygit in a submodule 2019-05-12 17:59:49 +10:00
git.go Pin the cached git config's commands to the repo directory 2026-07-20 17:07:39 +02:00
git_cmd_obj_builder.go Pin git commands to the repo they were created for 2026-07-20 17:07:39 +02:00
git_cmd_obj_builder_test.go Pin git commands to the repo they were created for 2026-07-20 17:07:39 +02:00
git_cmd_obj_runner.go Back off exponentially between lock-error retries 2026-07-15 10:08:44 +02:00
git_cmd_obj_runner_test.go Back off exponentially between lock-error retries 2026-07-15 10:08:44 +02:00