mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Refactor repo_paths.go to use git rev-parse
This changes GetRepoPaths() to pull information from `git rev-parse` instead of effectively reimplementing git's logic for pathfinding. This change fixes issues with bare repos, esp. versioned homedir use cases, by aligning lazygit's path handling to what git itself does. This change also enables lazygit to run from arbitrary subdirectories of a repository, including correct handling of symlinks, including "deep" symlinks into a repo, worktree, a repo's submodules, etc. Integration tests are now resilient against unintended side effects from the host's environment variables. Of necessity, $PATH and $TERM are the only env vars allowed through now.
This commit is contained in:
parent
74d937881e
commit
3d9f1e02e5
25 changed files with 590 additions and 442 deletions
1
test/.gitconfig
Symbolic link
1
test/.gitconfig
Symbolic link
|
@ -0,0 +1 @@
|
|||
global_git_config
|
Loading…
Add table
Add a link
Reference in a new issue