1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
Commit Graph

69 Commits

Author SHA1 Message Date
Jesse Duffield
1996eddd91 more efficient context diff size changing 2021-12-06 22:37:28 +11:00
Jesse Duffield
3621084096 small changes 2021-10-16 12:22:34 +11:00
Jesse Duffield
d02e52989e small changes 2021-10-16 12:22:34 +11:00
mjarkk
913a2fd065 Allow having multiple config files 2021-10-16 12:22:34 +11:00
Jesse Duffield
d626bcac00 color fixups 2021-08-01 16:14:56 +10:00
mjarkk
79848087bc Switch to github.com/gookit/color for terminal colors 2021-07-30 15:14:46 +02:00
Jesse Duffield
9fdf92b226 more refactoring
WIP

WIP
2021-06-06 09:12:49 +10:00
Jesse Duffield
a99e6ba071 update release notes 2021-04-20 18:34:47 +10:00
Jesse Duffield
3b7e7a7f56 add random tip to command log 2021-04-12 21:48:08 +10:00
Jesse Duffield
a9fbc9eda1 fix merge conflict panel not rendering 2021-04-11 10:21:53 +10:00
Jesse Duffield
4fe512ff3a test
type safe view access
2021-04-06 19:34:32 +10:00
Jesse Duffield
0898a7bb57 refactor 2021-04-06 19:34:32 +10:00
Jesse Duffield
bc9a99387f refactor of contexts and filtering 2021-04-06 19:34:32 +10:00
Jesse Duffield
798d3e2d54 get rid of these positively ghastly method signatures 2021-04-06 19:34:32 +10:00
Jesse Duffield
da3b0bf7c8 Start on supporting auto-suggestions when checking out a branch
switch to other fuzzy package with no dependencies
2020-11-28 20:48:17 +11:00
Jesse Duffield
682db77401 fix lint errors 2020-11-18 08:36:19 +11:00
Jesse Duffield
63f6d0c036 release notes in status panel 2020-10-10 00:23:01 +11:00
Jesse Duffield
795e4da8b8 do not put mutexes on state else we might unlock an unlocked mutex 2020-10-10 00:23:01 +11:00
Jesse Duffield
2e05ac0c90 paging keybindings for line by line panel
support searching in line by line panel

move mutexes into their own struct

add line by line panel mutex

apply LBL panel mutex

bump gocui to prevent crashing when search item count decreases
2020-10-10 00:23:01 +11:00
Jesse Duffield
37bb89dac3 type i18n 2020-10-10 00:23:01 +11:00
Jesse Duffield
4912205adb remove viper
WIP
2020-10-10 00:23:01 +11:00
Jesse Duffield
364bdcf532 safer getting of branch 2020-08-23 17:49:58 +10:00
Jesse Duffield
0dd2c869a8 minor refactor 2020-08-23 14:29:18 +10:00
Jesse Duffield
2855b5b4d5 standardise diffmode 2020-08-23 14:29:18 +10:00
Jesse Duffield
f5b22d94d9 WIP 2020-08-23 14:29:18 +10:00
Jesse Duffield
0f7b2c45d7 centralise split main panel code 2020-08-23 14:29:18 +10:00
Jesse Duffield
ac0eedda91 lots more stuff 2020-08-23 14:29:18 +10:00
Jesse Duffield
9b7a6934b3 more removing of g 2020-08-15 18:01:43 +10:00
Jesse Duffield
50d5b9e8e7 status view 2020-08-15 18:01:43 +10:00
Jesse Duffield
d9fa02c53b clean up interface for popup panels 2020-08-15 18:01:43 +10:00
Jesse Duffield
36ac764133 fix race condition when scrolling to merge conflict 2020-05-19 18:05:14 +10:00
Jesse Duffield
40fbce91ce add new diff mode
WIP

WIP

WIP

WIP

WIP

WIP

WIP
2020-03-29 18:26:24 +11:00
Jesse Duffield
a9559a5c87 move working tree state function into git.go 2020-03-28 13:19:35 +11:00
Jesse Duffield
f7add8d788 smarter refreshing for tags and remotes 2020-03-28 11:59:45 +11:00
Jesse Duffield
198d237679 more centralised handling of refreshing 2020-03-28 11:59:45 +11:00
Jesse Duffield
efb51eee96 more efficient refreshing 2020-03-28 11:59:45 +11:00
Jesse Duffield
1be0ff8da7 better upstream tracking and allow renaming a branch 2020-03-18 21:29:06 +11:00
Jesse Duffield
e6a8dc0bcf better logic for checking if we're rebasing 2020-02-25 22:09:43 +11:00
Jesse Duffield
f94d0be2c9 refactor the way we render lists 2020-02-25 21:21:07 +11:00
Jesse Duffield
23bcc19180 allow fast flicking through any list panel
Up till now our approach to rendering things like file diffs, branch logs, and
commit patches, has been to run a command on the command line, wait for it to
complete, take its output as a string, and then write that string to the main
view (or secondary view e.g. when showing both staged and unstaged changes of a
file).

This has caused various issues. For once, if you are flicking through a list of
files and an untracked file is particularly large, not only will this require
lazygit to load that whole file into memory (or more accurately it's equally
large diff), it also will slow down the UI thread while loading that file, and
if the user continued down the list, the original command might eventually
resolve and replace whatever the diff is for the newly selected file.

Following what we've done in lazydocker, I've added a tasks package for when you
need something done but you want it to cancel as soon as something newer comes
up. Given this typically involves running a command to display to a view, I've
added a viewBufferManagerMap struct to the Gui struct which allows you to define
these tasks on a per-view basis.

viewBufferManagers can run files and directly write the output to their view,
meaning we no longer need to use so much memory.

In the tasks package there is a helper method called NewCmdTask which takes a
command, an initial amount of lines to read, and then runs that command, reads
that number of lines, and allows for a readLines channel to tell it to read more
lines. We read more lines when we scroll or resize the window.

There is an adapter for the tasks package in a file called tasks_adapter which
wraps the functions from the tasks package in gui-specific stuff like clearing
the main view before starting the next task that wants to write to the main
view.

I've removed some small features as part of this work, namely the little headers
that were at the top of the main view for some situations. For example, we no
longer show the upstream of a selected branch. I want to re-introduce this in
the future, but I didn't want to make this tasks system too complicated, and in
order to facilitate a header section in the main view we'd need to have a task
that gets the upstream for the current branch, writes it to the header, then
tells another task to write the branch log to the main view, but without
clearing inbetween. So it would get messy. I'm thinking instead of having a
separate 'header' view atop the main view to render that kind of thing (which
can happen in another PR)

I've also simplified the 'git show' to just call 'git show' and not do anything
fancy when it comes to merge commits.

I considered using this tasks approach whenever we write to a view. The only
thing is that the renderString method currently resets the origin of a view and
I don't want to lose that. So I've left some in there that I consider harmless,
but we should probably be just using tasks now for all rendering, even if it's
just strings we can instantly make.
2020-01-12 11:17:20 +11:00
Jesse Duffield
1f3e1720a3 split RemoteBranch out from Branch 2019-11-21 22:07:14 +11:00
Jesse Duffield
e85310c0a9 add mouse support 2019-11-10 22:32:13 +11:00
Jesse Duffield
beaebb7dc7 handling when to show the split panel 2019-11-05 19:22:01 +11:00
Jesse Duffield
e68dbeb7eb organise keybindings better 2019-03-22 20:20:06 +11:00
Jesse Duffield
0c886eddfb Revert "remove old rebase code now that we're only ever interactively rebasing"
This reverts commit 1a19b1412d.
2019-03-02 20:00:26 +11:00
Jesse Duffield Duffield
8c0ea8f45f mouse support 2019-03-02 17:49:30 +11:00
Jesse Duffield Duffield
1a19b1412d remove old rebase code now that we're only ever interactively rebasing 2019-02-24 11:03:14 +11:00
Jesse Duffield
d44638130c add various interactive rebase commands 2019-02-18 23:27:54 +11:00
Jesse Duffield
daca07eaca add loading panel 2019-02-16 12:03:22 +11:00
Jesse Duffield
9489a94473 Make merge panel its own panel 2018-12-11 22:02:12 +11:00