diff options
author | John Whitley <john@luminous-studios.com> | 2023-12-24 08:46:02 -0800 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2024-01-24 08:40:01 +0100 |
commit | 3d9f1e02e5063e1ce24f4b9122963eaef64b7262 (patch) | |
tree | 8cd1102b24e36b52c28199e564f7e3f65a056c56 /test | |
parent | 74d937881edf7e3271976fa7484286c82650fb2e (diff) |
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.
Diffstat (limited to 'test')
l--------- | test/.gitconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/.gitconfig b/test/.gitconfig new file mode 120000 index 000000000..b2405f3cd --- /dev/null +++ b/test/.gitconfig @@ -0,0 +1 @@ +global_git_config
\ No newline at end of file |