1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-11 12:48:10 +03:00
Commit Graph

9 Commits

Author SHA1 Message Date
3d9f1e02e5 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.
2024-01-24 08:40:01 +01:00
7a4a0c85c4 Fix test 2023-08-19 19:12:36 +03:00
ee308a4994 Clean before convertion? 2023-08-19 18:36:57 +03:00
a2b2336173 Stylistic changes 2023-08-19 18:36:57 +03:00
d7b1deb465 Clean path 2023-08-19 18:36:57 +03:00
dd01639f57 Improve error message 2023-08-19 18:36:57 +03:00
8e7958f78b Fix seg-fault when opening submodule in nested folder 2023-08-07 23:57:28 +10:00
595e28d335 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
2023-08-07 22:40:53 +10:00
f31e213edc rename files 2023-07-30 18:35:36 +10:00