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

63 Commits

Author SHA1 Message Date
Ryooooooga
df4eb70ba2 Fix translations 2021-08-25 22:23:55 +10:00
Ryooooooga
6ca42ff720 Fix pick all hunks 2021-08-25 22:23:55 +10:00
Ryooooooga
a0e7604f61 Support git config merge.conflictStyle diff3 2021-08-25 22:23:55 +10:00
Jesse Duffield
98375dc902 refactor merge panel 2021-04-18 18:58:09 +10:00
Jesse Duffield
6fbe660f96 full coverage for logging commands 2021-04-11 17:07:49 +10:00
Jesse Duffield
2d8f7d2a7b better way of scrolling to a merge conflict 2021-04-11 10:21:53 +10:00
Jesse Duffield
d627b3bfc8 more refactoring 2021-04-06 19:34:32 +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
216b5341ae better handling of scrolling for conflicted files 2021-04-02 11:09:12 +11:00
Jesse Duffield
eeeef9ca86 refactor 2021-04-02 11:09:12 +11:00
Jesse Duffield
cc9293b386 add mutex to prevent crashes with merge conflicts 2021-04-02 11:09:12 +11:00
Jesse Duffield
7d62f103e4 big refactor to give our enums actual types 2021-04-02 11:00:15 +11: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
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
077f113618 add in-built logging support for a better dev experience 2020-09-26 11:00:50 +10:00
Jesse Duffield
d2d88fe64e fix focus change on merge popup return 2020-08-23 19:28:59 +10:00
Jesse Duffield
94601b4dc9 use context to return to the correct view 2020-08-23 14:29:18 +10:00
Jesse Duffield
fda9f4ea7a centralise logic for rendering options map 2020-08-23 14:29:18 +10:00
Jesse Duffield
0dd2c869a8 minor refactor 2020-08-23 14:29:18 +10:00
Jesse Duffield
9c866fd49c more standardisation 2020-08-23 14:29:18 +10:00
Jesse Duffield
6c270b6e26 WIP 2020-08-23 14:29:18 +10:00
Jesse Duffield
f5b22d94d9 WIP 2020-08-23 14:29:18 +10:00
Jesse Duffield
ed4574bda9 standardise getting selected item 2020-08-23 14:29:18 +10:00
Jesse Duffield
7f89113245 WIP 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
0822a9296c rename 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
cf5cefb2d6 allow user to scroll themselves inside merge panel 2020-05-19 18:44:53 +10:00
Jesse Duffield
36ac764133 fix race condition when scrolling to merge conflict 2020-05-19 18:05:14 +10:00
Jesse Duffield
913f17ee3e prevent flicker from bolding background of selected line 2020-05-15 21:12:12 +10:00
Jesse Duffield
267730bc00 standardise how we handle background colours 2020-05-13 21:24:25 +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
40b173118a fix conflict race condition 2020-03-29 02:36:01 +00:00
Jesse Duffield
a9559a5c87 move working tree state function into git.go 2020-03-28 13:19:35 +11:00
Jesse Duffield
906a49049e smart refreshing files 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
daecdd7c2b redoing 2020-03-25 09:39:04 +11:00
Jesse Duffield
e47ad846c4 big golangci-lint cleanup 2020-03-09 12:23:13 +11:00
Jesse Duffield
5e95019b3f Missed a spot with this new string task thing
The issue here was that we were using a string task
but expecting to be able to set the origin straight after
to point at the conflict, but because it's async it was
actually resetting the origin to 0 after a little bit.

The proper solution here is maybe to add a flag to that thing
asking whether you want to reset main's origin. But I'm
too lazy to do that right now so instead I'm just using
setViewContent. That will probably cause issues in the future.
2020-01-12 14:43:17 +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
David Chen
de2cfc7e17 cleanup 2020-01-07 12:48:11 -08:00
David Chen
529ba45cc7 fixed keybinding display in merge_panel.go 2020-01-07 09:50:25 -08:00
Jesse Duffield
194c554357 support ours/theirs merge conflict headers 2019-11-08 09:31:27 +11:00
Jesse Duffield
1a38bfb76d do not return focus to commitsFiles view after selecting to start a new patch 2019-11-05 19:22:01 +11:00
mjarkk
02fef3136f Added light theme option to the settings 2019-10-20 12:32:57 +11:00
Jesse Duffield
43758cbb5f i18n for rebase loading states 2019-03-03 16:11:20 +11:00