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

250 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
f3eb180f75 Standardise display of range selection across views
We're not fully standardising here: different contexts can store their range state however
they like. What we are standardising on is that now the view is always responsible for
highlighting the selected lines, meaning the context/controller needs to tell the view
where the range start is.

Two convenient benefits from this change:
1) we no longer need bespoke code in integration tests for asserting on selected lines because
we can just ask the view
2) line selection in staging/patch-building/merge-conflicts views now look the same as in
list views i.e. the highlight applies to the whole line (including trailing space)

I also noticed a bug with merge conflicts not rendering the selection on focus though I suspect
it wasn't a bug with any real consequences when the view wasn't displaying the selection.

I'm going to scrap the selectedRangeBgColor config and just let it use the single line
background color. Hopefully nobody cares, but there's really no need for an extra config.
2024-01-19 10:47:21 +11:00
a200fccba9 Add explosion animation when nuking working tree
I've been thinking about this for a while: I think it looks really cool if nuking your working tree
actually results in a nuke animation.

So I've added an opt-out config for it
2023-08-01 22:16:04 +10:00
9cc1d65280 Add demo test variant
We're piggybacking on our existing integration test framework to record  demos that we can include in our docs
2023-07-31 22:33:04 +10:00
605bc026a1 Set promptToReturnFromSubprocess to false for integration tests
There is no way how we could confirm the prompt in an integration test.
2023-04-01 08:16:15 +02:00
45d45d2397 show file tree by default in integration tests 2023-02-26 13:01:51 +11:00
f7e8b2dd71 cleanup integration test code 2023-02-26 12:54:13 +11:00
8b5d59c238 remove legacy integration tests 2023-02-26 11:34:18 +11:00
f82f4f6dbc disable auto-refresh in integration tests 2023-02-26 11:23:18 +11:00
ff3c5d331e migrate merge conflict tests 2023-02-26 11:22:24 +11:00
dd1bf629b8 migrate patch building tests 2023-02-25 21:37:16 +11:00
c63fed2074 migrate staging tests 2023-02-23 22:29:40 +11:00
1034962c7e migrate more tests 2023-02-22 22:29:01 +11:00
eabe7f462a migrate more tests 2023-02-22 21:57:32 +11:00
22c10479d5 migrate reflog integration tests 2023-02-22 21:15:03 +11:00
78f3a7a478 migrate interactive rebase integration tests 2023-02-22 19:36:31 +11:00
526c9dea9b Merge pull request #2293 from jesseduffield/feature/make-discarding-harder 2023-02-21 22:03:25 +11:00
bfde06d049 migrate push tests 2023-02-21 21:50:03 +11:00
2b6a109e38 migrate stash tests 2023-02-20 21:52:27 +11:00
6ee20840b2 migrate switch tab from menu test 2023-02-20 19:28:52 +11:00
06351c1adf remove old tag tests 2023-02-20 19:01:08 +11:00
ac580ae6a0 migrate undo2 2023-02-20 18:20:23 +11:00
65bd0ab431 migrate undo test 2023-02-19 15:48:09 +11:00
93b9e1bd19 migrate merge conflict undo test 2023-02-19 15:48:09 +11:00
b5e325b0a4 migrate revert merge test 2023-02-19 15:48:09 +11:00
88c76868ba migrate initial open test 2023-02-19 15:48:09 +11:00
e471567b5d remove already migrated test 2023-02-19 15:48:09 +11:00
13ee0f0a5d migrate open to branches with cli arg test 2023-02-19 15:48:09 +11:00
76a1b501f2 migrate more force push tests 2023-02-19 15:48:09 +11:00
31d796ee75 migrate forcePush integration test 2023-02-19 13:38:15 +11:00
a3096e720c migrate pullAndSetUpstream test 2023-02-19 12:42:48 +11:00
c599aaed51 migrate pull integration test 2023-02-19 11:48:21 +11:00
3cfdae4116 migrate submodule reset test 2023-02-12 18:12:01 +11:00
d7956c481d migrate submodule enter test 2023-02-12 18:12:01 +11:00
7a3291a1f7 fix test 2023-02-12 18:12:01 +11:00
1c48842277 migrate submodule remove test 2023-02-12 10:47:45 +11:00
010f6d7f6e migrate submodule add test 2023-02-12 10:47:41 +11:00
89ba3a38b4 migrate filter path tests 2022-12-30 22:42:32 +11:00
6f709456fe migrate test for rename branch and pull 2022-12-30 22:42:32 +11:00
277ca706eb migrate fetchPrune integration test 2022-12-30 22:42:32 +11:00
8a1c763942 more git ignore stuff in integration test 2022-12-30 22:42:32 +11:00
5e9a897348 migrate ignore gitignore integration test 2022-12-28 13:35:07 +11:00
f2d0f362d4 migrate discard staged changes test 2022-12-28 13:24:23 +11:00
ae07cf5506 migrate discard old file change test 2022-12-28 13:01:32 +11:00
5c11b1ecb7 discard changes integration test 2022-12-24 19:05:46 +11:00
7c7f7bf9b9 migrate diffing integration tests 2022-12-21 22:52:23 +11:00
f910b42c9c migrate confirm-on-quit integration test 2022-12-20 23:08:39 +11:00
e3c6738535 remove snapshot approach for new integration tests 2022-12-20 22:45:03 +11:00
bc4ace8357 add commit revert integration test 2022-12-20 22:45:02 +11:00
b40190bd94 add multi-line commit integration test 2022-12-20 22:45:02 +11:00