Commit graph

2538 commits

Author SHA1 Message Date
Jesse Duffield 26ca41a40e Handle pending actions properly in git commands that require credentials
I don't know if this is a hack or not: we run a git command and increment the pending action
count to 1 but at some point the command requests a username or password, so we need to prompt
the user to enter that. At that point we don't want to say that there is a pending action,
so we decrement the action count before prompting the user and then re-increment it again afterward.

Given that we panic when the counter goes below zero, it's important that it's not zero
when we run the git command (should be impossible anyway).

I toyed with a different approach using channels and a long-running goroutine that
handles all commands that request credentials but it feels over-engineered compared to this
commit's approach.
2023-07-08 22:54:52 +10:00
Jesse Duffield 6c4e7ee972 Add busy count for integration tests
Integration tests need to be notified when Lazygit is idle so they can progress to the next assertion / user action.
2023-07-08 22:54:52 +10:00
Jesse Duffield 5d982e1d70 Add mutex to filtered list to avoid concurrency issues 2023-07-03 12:54:14 +10:00
Jesse Duffield b625eb5323 Differentiate between different filter modes
We can filter by path, by file status, and by text.
2023-07-03 12:54:14 +10:00
Jesse Duffield 8e46b8a275 Use searching, not filtering, in file tree views
There's more work to be done to support filtering for these views so we're sticking with searching for now
2023-07-03 12:54:14 +10:00
Jesse Duffield cd989d8ebe Fix escape logic for remote branches
The remote branches controller was using its own escape method meaning it didn't go through the flow of cancelling
an active filter. It's now using the same approach as the sub-commits and commit-files contexts: defining a parent
context to return to upon hittin escape.
2023-07-03 12:54:14 +10:00
Jesse Duffield 261f30f49c Add integration tests for searching/filtering 2023-07-03 12:54:14 +10:00
Jesse Duffield 7d7399a89f Support case sensitive filtering 2023-07-03 12:54:14 +10:00
Jesse Duffield 9df634f13f Color view frame differently when searching/filtering
Given that we now persist search/filter states even after a side context loses focus, we need to make it really
clear to the user that the context is currently being searched/filtered
2023-07-03 12:54:14 +10:00
Jesse Duffield 3ca1292fb4 Show filter status similar to what we show with search 2023-07-03 12:54:14 +10:00
Jesse Duffield 13c1103815 Only cancel search if main or temporary context loses focus
This is a pickle: initially I wanted it so that a filter would cancel automatically if the current context lost focus.
But there are situations where you want to retain the focus, e.g. when a popup appears, or when you view the commits
of a branch. The issue is that when you view the commits of a branch, the branches context is removed from the context
stack. Even if this were not the case, you could imagine going branches -> sub-commits -> files -> sub-commits, where
in that case branches would definitely be off the stack upon navigating to the files context.

So because I'm too lazy to find a proper solution to this problem, I'm just making it so that filters in side contexts
are retained unless explicitly cancelled.

There's another edge case this commit handles which is that if I'm in the sub-commits context via the branches context
and start a search, then navigate to the reflog context and hit enter to get to the sub-commits context again, I need
to cancel the search before I switch. Likewise with the commit files context.
2023-07-03 12:54:14 +10:00
Jesse Duffield b8bee4de51 Scroll to top when filtering and retain selection when cancelling filter 2023-07-03 12:54:14 +10:00
Jesse Duffield d67b209e62 Move more logic into search helper 2023-07-03 12:54:14 +10:00
Jesse Duffield bf5871cc4f Case insensitive string comparison 2023-07-03 12:54:13 +10:00
Jesse Duffield 13326344f0 Support filtering files 2023-07-03 12:54:13 +10:00
Jesse Duffield 84870d4503 Cancel filter/search when hitting escape 2023-07-03 12:54:13 +10:00
Jesse Duffield a9e2c8129f Introduce filtered list view model
We're going to start supporting filtering of list views
2023-07-03 12:54:13 +10:00
Jesse Duffield c9a917b830 Print entire panic message
For some reason, the panic message was being truncated. So here we're printing it first, and then calling panic
2023-07-02 15:47:04 +10:00
Amirzhan Aliyev 62cc036254 fix: typo EnteRefName 2023-06-28 18:54:21 +06:00
Stefan Haller ee03a0be41 Rename "Delete change" menu entry to "Discard change" in staging panel
For consistency with the previous commit.

Note that this menu entry is used both for unstaged and for staged changes, and
for staged changes it is not quite accurate, as we are not discarding changes in
that case (just unstaging them). Not sure it's worth fixing this; it's still
better than "Delete", anyway.
2023-06-26 08:19:58 +02:00
Stefan Haller 51a558040d Fix the title and text (and variable names) of the Discard Changes prompt
The title was saying "Unstage lines", which was just wrong. The text said
"Delete lines", which can be seen as a bit misleading; we are only discarding
the changes to the selected lines, not deleting the lines themselves.

For consistency, rename the config variable skipUnstageLineWarning accordingly.
2023-06-26 08:15:35 +02:00
Stefan Haller 3928d0ebda Insert fake todo entry for a conflicting commit that is being applied
When stopping in a rebase because of a conflict, it is nice to see the commit
that git is trying to apply. Create a fake todo entry labelled "conflict" for
this, and show the "<-- YOU ARE HERE ---" string for that one (in red) instead
of for the real current head.
2023-06-22 18:57:58 +02:00
Stefan Haller 77c5d1761d Add nerdFontsVersion config 2023-06-15 21:47:52 +02:00
Stefan Haller 6ab5d7f69b Turn remoteIcons into a map
We don't actually use it to do map lookups; we still iterate over it in the same
way as before. However, using a map makes it easier to patch elements; see the
next commit.
2023-06-15 13:25:32 +02:00
Stefan Haller 1f42c8a387 Allow discarding changes only from local commits
We use CommitFilesController also for the files of commits that we show
elsewhere, e.g. for branch commits, tags, or stashes. It doesn't make sense to
discard changes from those (for stashes it might be possible to implement it
somehow, but that would be a new feature), so we disallow it unless we are in
the local commits panel.
2023-06-07 12:48:56 +02:00
Stefan Haller 5c55ce6555 Better prompt for discarding old file changes
Lazygit knows what kind of file change this is, so there doesn't have to be any
"if" in the prompt text.
2023-06-07 12:47:03 +02:00
Stefan Haller 1f801b91e4 Disallow discarding file changes while a directory is selected
Discarding changes to an entire directory doesn't quite work correctly in all
cases; for example, if the current commit added files to the directory (but the
directory existed before) then those files won't be removed.

It might be possible to fix the command so that these cases always work for
directories, but I don't think it's worth the effort (you can always use a
custom patch for that), so let's display an error for now.
2023-06-07 12:47:03 +02:00
Jesse Duffield c92e687d3b Fix focus issue when opening recent-repos menu at launch
I don't know why we were setting the initial context to CurrentSideContext
and not just CurrentContext in the first place. If there is no current context
in either case it'll default to the files context. So the only issue is if
we anticipated that some random context would be focused and we didn't want to
activate that. But I can't think of any situation where that would happen.
2023-06-07 18:27:18 +10:00
Jesse Duffield a694c458dd Support authors and tags in custom command suggestions preset 2023-06-07 10:18:01 +10:00
Jesse Duffield 1932c2366b Appease linter 2023-06-03 15:54:03 +10:00
Jesse Duffield e98935f83e
Merge pull request #2699 from jesseduffield/revert-hide-underscores 2023-06-01 22:30:56 +10:00
Jesse Duffield 5df27c61ed Apply correct styling to root commit in graph
The root commit is special in that it has no parents. So we need to add a pipe that's headed for a commit
that doesn't actually exist i.e. the mythical empty tree commit. We're using the actual hash of that
pseudo-commit, but it's not being read anywhere.
2023-06-01 22:20:30 +10:00
Jesse Duffield c9136538b5 Refresh commits viewport on focus lost
We don't want the highlighted selection sticking around after the context loses focus.
2023-06-01 21:31:57 +10:00
Jesse Duffield b250644ea8 Stop hiding underscores for VSCode
VSCode had an issue in their terminal where underscores were printed all over the place.
That has now been fixed.
See https://github.com/jesseduffield/lazygit/issues/2294 and https://github.com/xtermjs/xterm.js/issues/4238
2023-06-01 20:12:20 +10:00
Jesse Duffield a4db44bc3d show commits against branches 2023-06-01 19:21:24 +10:00
Stefan Haller 16dceb813b Show menu instead of prompt when there are conflicts in a rebase or merge
This solves the issue that previously you could too easily abort a rebase
accidentally by hitting escape.
2023-06-01 10:51:48 +02:00
Jesse Duffield 1de876ed4d Support using command output directly in menuFromCommand custom command prompt
The menuFromCommand option is a little complicated, so I'm adding an easy way to just use the command output directly,
where each line becomes a suggestion, as-is.

Now that we support suggestions in the input prompt, there's less of a need for menuFromCommand, but it probably still
serves some purpose.

In future I want to support this filter/valueFormat/labelFormat thing for suggestions too. I would like to think a little more
about the interface though: is using a regex like we currently do really the simplest approach?
2023-05-29 22:52:16 +10:00
Jesse Duffield 036a1ea519 Support suggestions generated from command in custom commands
This changes the interface a bit but it was only added earlier today so I doubt anybody is dependent on it yet.

I'm also updating the docs.
2023-05-29 22:47:35 +10:00
Jesse Duffield 16fa22a36e Add suggestionsPreset to custom commands system 2023-05-29 14:24:49 +10:00
Jesse Duffield 0e0458f355 More compact and flexible date format
You can now configure both a time format and a short time format, where the short format kicks in
when the time is within the last day
2023-05-26 17:31:39 +10:00
Jesse Duffield 05bfa96936
Merge pull request #2672 from jesseduffield/sentence-case 2023-05-26 17:21:33 +10:00
Jesse Duffield d772c9f1d4 Use sentence case everywhere
We have not been good at consistent casing so far. Now we use 'Sentence case' everywhere. EVERYWHERE.

Also Removing 'Lc' prefix from i18n field names: the 'Lc' stood for lowercase but now that everything
is in 'Sentence case' there's no need for the distinction.

I've got a couple lower case things I've kept: namely, things that show up in parentheses.
2023-05-25 23:52:19 +10:00
Jesse Duffield add1de4138 Use boolean field to control whether viewport is refreshed on line focus
Go really doesn't like us doing anything inheritance-y: it does not support open recursion meaning
it's really hard to re-use code. As such, here we're falling back to conditional logic.

This fixes an issue where our ListContextTrait was calling FocusLine which was intended to be
overridden by ViewportListContextTrait, but the subclassed function wasn't being called. I'm
not actually sure how this went wrong given that it was working fine in the past, but at any rate,
the new code is easy to follow.
2023-05-25 17:09:18 +10:00
Jesse Duffield 63dc07fded Construct arg vector manually rather than parse string
By constructing an arg vector manually, we no longer need to quote arguments

Mandate that args must be passed when building a command

Now you need to provide an args array when building a command.
There are a handful of places where we need to deal with a string,
such as with user-defined custom commands, and for those we now require
that at the callsite they use str.ToArgv to do that. I don't want
to provide a method out of the box for it because I want to discourage its
use.

For some reason we were invoking a command through a shell when amending a
commit, and I don't believe we needed to do that as there was nothing user-
supplied about the command. So I've switched to using a regular command out-
side the shell there
2023-05-23 19:49:19 +10:00
Jesse Duffield ec3a28df43 Right-align key labels in menu
I find this makes it look a little nicer
2023-05-21 12:09:43 +10:00
Jesse Duffield e1fc90615d Apply strikethrough style to reserved keybindings in menus
If a given menu item has an associated keybinding of 'enter', hitting enter won't actually execute
that item unless your cursor is on it. This creates confusion, and so we're going to use a strikethrough
style to communicate that the keybinding is reserved for something else.
2023-05-21 11:31:29 +10:00
Jesse Duffield 460a166e16 Stop displaying navigation keybinding at bottom of screen
The reason for this is that now our labels for navigation keybindings are larger so they
take up more realestate. It's not the kind of thing a user needs to be told anyway,
anybody is going to try out hjkl and the arrow keys when a TUI opens up.

We could map from <up> to the single character up unicode rune but given you can rebind this stuff
I'd rather keep it simple
2023-05-21 11:01:15 +10:00
Jesse Duffield 2e66d87b94 Use same labels for keys that we use in the config
Previously we were displaying keys in a different format than we expected them in the config.
This was certain to cause confusion.
2023-05-21 10:59:16 +10:00
Jesse Duffield 820f7b9404 Support strikethrough text style 2023-05-21 10:46:13 +10:00
Jesse Duffield ed857d1e07 Show correct keybinding in tip 2023-05-20 23:36:34 +10:00
Jesse Duffield ee11046d35 Refactor interface for ApplyPatch 2023-05-20 20:54:39 +10:00
Stefan Haller 401610c0ef Remove the toast when toggling "ignore whitespace"
Now that we visualize the state, the toast is no longer needed.
2023-05-20 12:58:32 +10:00
Stefan Haller 64b2685c2d Visualize the "ignore whitespace" state in the subtitle of the diff view 2023-05-20 12:58:32 +10:00
Stefan Haller 7d4bfb6621 Don't toggle "ignore whitespace" in the staging and patch building panels
The option doesn't have any affect in these views, so we don't need to toggle it
here. But the problem was the HandleFocus call at the end: this would activate
the wrong view, so we need to avoid it here.

Show an error if the user tries to turn the option on, to let them know that it
doesn't work here.
2023-05-20 12:58:32 +10:00
Stefan Haller a2778f01c6 Disregard the "ignore whitespace" option in the patch building panel
It's not possible to reliably stage things into a custom patch when "ignore
whitespace" is on, so always treat it as off here (like we do in the staging
panel).

It looks like this is a regression that was introduced in 8edad826ca.
2023-05-19 18:22:28 +02:00
Jesse Duffield d161afe37f Support ignoring whitespace on stash 2023-05-19 17:49:22 +02:00
Jesse Duffield 681a9bf20d
Merge pull request #2612 from longlhh90/fix-commit-prefixes-with-empty-commit-message 2023-05-17 17:12:05 +10:00
Lukas 0606b7a43b remove empty message check as message of commit can be empty 2023-05-17 17:07:50 +10:00
Jesse Duffield a82134f41c Fix race condition
Our refresh code may try to push a context. It does this in two places:
1) when all merge conflicts are resolved, we push a 'continue merge?' confirmation context
2) when all conflicts of a given file are resolved and we're in the merge conflicts context,
   we push the files context.

Sometimes we push the confirmation context and then push the files context over it, so the user
never sees the confirmation context.

This commit fixes the race condition by adding a check to ensure that we're still in the
merge conflicts panel before we try escaping from it
2023-05-16 21:01:38 +10:00
Jesse Duffield 00b03079d8 Don't deactivate context that you're about to activate 2023-05-16 21:01:38 +10:00
Jesse Duffield 9592686629 Compare contexts with keys
We don't want to compare contexts directly given they are interfaces and not
pointers to structs
2023-05-16 21:01:38 +10:00
Jesse Duffield 114ad52ff6 Rename CmdLog -> GuiLog
We want to log both actions and commands for the sake of integration tests
2023-05-16 21:01:38 +10:00
Stefan Haller e5dd4d3110 Allow the selected line of a list view to be outside the visible area
I don't see a reason why this restriction to have the selection be always
visible was necessary. Removing it has two benefits:

1. Scrolling a list view doesn't change the selection. A common scenario: you
   look at one of the commits of your current branch; you want to see the how
   many'th commit this is, but the beginning of the branch is scrolled off the
   bottom of the commits panel. You scroll down to find the beginning of your
   branch, but this changes the selection and shows a different commit now - not
   what you want.

2. It is possible to scroll a panel that is not the current one without changing
   the focus to it. That's how windows in other GUIs usually behave.
2023-05-11 13:23:58 +02:00
Jesse Duffield 007b406b14 remove duplicate method 2023-05-11 19:00:41 +10:00
Jesse Duffield 2b30085dba Merge branch 'master' into refactor-better-encapsulation 2023-05-11 19:00:01 +10:00
Jesse Duffield 5dacbb6293 merge master into refactor-better-encapsulation 2023-05-02 19:05:42 +10:00
Stefan Haller fba1a2b5ac Add config gui.experimentalShowBranchHeads
People find the new (*) display for branch heads in the commits list confusing,
so make it opt-in for now.
2023-05-02 18:58:54 +10:00
Jesse Duffield c6c4346d48
Merge pull request #2551 from stefanhaller/fix-initial-context-activation 2023-05-01 21:22:43 +10:00
Jesse Duffield ee9ae8f07f
Merge pull request #2552 from stefanhaller/support-stacked-branches 2023-05-01 21:07:19 +10:00
Jesse Duffield af97bf484c Refresh staging panel when committing
We now refresh the staging panel when doing an unscoped refresh, so that if we commit from the staging panel we escape
back to the files panel if need be. But that causes flickering when doing an unscoped refresh from other contexts,
because the refreshStagingPanel function assumes that the staging panel has focus. So we're adding a guard at the top
of that function to early exit if we don't have focus.
2023-04-30 13:19:54 +10:00
Jesse Duffield a57310df24 Retain commit message when cycling history
When cycling history, we want to make it so that upon returning to the original prompt, you get your text back.
Importantly, we don't want to use the existing preservedMessage field for that because that's only for preserving
a NEW commit message, and we don't want the history stuff of the commit reword flow to overwrite that.
2023-04-30 13:19:54 +10:00
Sean 9d68b287db Split commit message panel into commit summary and commit description panel
When we use the one panel for the entire commit message, its tricky to have a keybinding both for adding a newline and submitting.
By having two panels: one for the summary line and one for the description, we allow for 'enter' to submit the message when done from the summary panel,
and 'enter' to add a newline when done from the description panel. Alt-enter, for those who can use that key combo, also works for submitting the message
from the description panel. For those who can't use that key combo, and don't want to remap the keybinding, they can hit tab to go back to the summary panel
and then 'enter' to submit the message.

We have some awkwardness in that both contexts (i.e. panels) need to appear and disappear in tandem and we don't have a great way of handling that concept,
so we just push both contexts one after the other, and likewise remove both contexts when we escape.
2023-04-30 13:19:53 +10:00
Jesse Duffield a5c72d056d ensure initial context is set when entering submodule 2023-04-30 13:19:53 +10:00
Jesse Duffield dd31f8ecea update cheatsheets 2023-04-30 13:19:53 +10:00
Jesse Duffield 5a7b2ab6d0 fix rendering of commit files view 2023-04-30 13:19:53 +10:00
Jesse Duffield 68a9d7fd77 appease linter 2023-04-30 13:19:53 +10:00
Jesse Duffield 19cbafcdfc remove unused file 2023-04-30 13:19:53 +10:00
Jesse Duffield f2c85c5b19 move side window actions to controllers package 2023-04-30 13:19:53 +10:00
Jesse Duffield 0faa41e6f8 move toggle whitespace action to controllers package 2023-04-30 13:19:53 +10:00
Jesse Duffield 037cd99138 move quit actions to controller 2023-04-30 13:19:53 +10:00
Jesse Duffield d3e9bc2185 remove unused file 2023-04-30 13:19:53 +10:00
Jesse Duffield ea4587a3b8 move some methods 2023-04-30 13:19:53 +10:00
Jesse Duffield 2da300f2fb move diffing menu action to controller 2023-04-30 13:19:53 +10:00
Jesse Duffield 7848958326 move filtering menu action to controller 2023-04-30 13:19:53 +10:00
Jesse Duffield 2cba98e3fe move another action into controller 2023-04-30 13:19:53 +10:00
Jesse Duffield f8c9ce33c2 move more actions into controller 2023-04-30 13:19:53 +10:00
Jesse Duffield 71753770ad move custom patch options menu action to controllers package 2023-04-30 13:19:53 +10:00
Jesse Duffield 820b1e811d move custom command action into its own file 2023-04-30 13:19:53 +10:00
Jesse Duffield 4a33fede7b move window arrangement helper 2023-04-30 13:19:53 +10:00
Jesse Duffield db12853bbe lots of changes 2023-04-30 13:19:53 +10:00
Jesse Duffield 711674f6cd standardise controller helper methods 2023-04-30 13:19:53 +10:00
Jesse Duffield fc91ef6a59 standardise helper args 2023-04-30 13:19:53 +10:00
Jesse Duffield 43251e7275 split context common from helper common 2023-04-30 13:19:53 +10:00
Jesse Duffield f081358943 move getDisplayStrings funcs into contexts 2023-04-30 13:19:53 +10:00
Jesse Duffield 0c6ab4b43e refactor cherry pick code to move state access out of helper 2023-04-30 13:19:53 +10:00
Jesse Duffield 1b2fb34ffd start moving getDisplayStrings funcs into contexts 2023-04-30 13:19:53 +10:00
Jesse Duffield 0e5a4c7a36 move getModel functions into contexts 2023-04-30 13:19:53 +10:00
Jesse Duffield 47b91f1ef5 move views into contexts 2023-04-30 13:19:53 +10:00
Jesse Duffield e2db6a1732 remove context callback opts 2023-04-30 13:19:53 +10:00
Jesse Duffield 509e3efa70 lots more refactoring 2023-04-30 13:19:53 +10:00
Jesse Duffield 8edad826ca Begin refactoring gui
This begins a big refactor of moving more code out of the Gui struct into contexts, controllers, and helpers. We also move some code into structs in the
gui package purely for the sake of better encapsulation
2023-04-30 13:19:52 +10:00
Jesse Duffield 9adbef40de Refresh staging panel when committing
We now refresh the staging panel when doing an unscoped refresh, so that if we commit from the staging panel we escape
back to the files panel if need be. But that causes flickering when doing an unscoped refresh from other contexts,
because the refreshStagingPanel function assumes that the staging panel has focus. So we're adding a guard at the top
of that function to early exit if we don't have focus.
2023-04-30 12:17:34 +10:00
Jesse Duffield 0cd5257523 Retain commit message when cycling history
When cycling history, we want to make it so that upon returning to the original prompt, you get your text back.
Importantly, we don't want to use the existing preservedMessage field for that because that's only for preserving
a NEW commit message, and we don't want the history stuff of the commit reword flow to overwrite that.
2023-04-30 12:17:34 +10:00
Sean 49da7b482d Split commit message panel into commit summary and commit description panel
When we use the one panel for the entire commit message, its tricky to have a keybinding both for adding a newline and submitting.
By having two panels: one for the summary line and one for the description, we allow for 'enter' to submit the message when done from the summary panel,
and 'enter' to add a newline when done from the description panel. Alt-enter, for those who can use that key combo, also works for submitting the message
from the description panel. For those who can't use that key combo, and don't want to remap the keybinding, they can hit tab to go back to the summary panel
and then 'enter' to submit the message.

We have some awkwardness in that both contexts (i.e. panels) need to appear and disappear in tandem and we don't have a great way of handling that concept,
so we just push both contexts one after the other, and likewise remove both contexts when we escape.
2023-04-30 12:17:34 +10:00
Stefan Haller d675117289 Fix activation of initial context
This broke with 40f6767cfc77; the symptom is that starting lazygit with a git
arg (e.g. "lazygit log") wouldn't activate the requested panel correctly. While
it would show in the expanded view, it didn't have a green frame, and keyboard
events would go to the files panel.
2023-04-29 07:37:44 +02:00
Stefan Haller 3fe4db9316 Make RebaseCommands.AmendTo more robust
This fixes two problems with the "amend commit with staged changes" command:

1. Amending to a fixup commit didn't work (this would create a commmit with the
   title "fixup! fixup! original title" and keep that at the top of the branch)
2. Unrelated fixup commits would be squashed too.

The added integration test verifies that both of these problems are fixed.
2023-04-29 07:28:33 +02:00
Stefan Haller dad7a70bf8 Implement moving commits up/down in terms of daemon 2023-04-29 07:28:33 +02:00
Stefan Haller b8fbe9756e Implement squash, fixup, drop, and reword in terms of daemon 2023-04-29 07:28:33 +02:00
Stefan Haller d50c58b4c6 Implement "edit commit" in terms of the new EditRebase function 2023-04-29 07:28:33 +02:00
Stefan Haller 21072226d2 Don't allow resetting non-HEAD commits (including rebase todos) during rebase 2023-04-18 17:34:07 +02:00
AzraelSec 28501fbf77 chore: add focus on local commits after interactively rebase 2023-04-15 10:42:36 +02:00
AzraelSec a3fdf91714 feat: allow to perform a rebase with breaking before the first commit 2023-04-15 17:26:08 +10:00
Stefan Haller d675eb6507 Don't allow changing the type of certain rebase todos
We already show "merge" todo entries when starting an interactive rebase with
--rebase-merges outside of lazygit. Changing the type of a merge entry to "pick"
or "edit" doesn't make sense and shouldn't be allowed. Earlier in this branch we
have started to show "update-ref" entries, these can't be changed either (they
can be moved, though).

You might argue that it should be possible to change them to "drop", but in the
case of "update-ref" this doesn't make sense either, because "drop" needs a Sha
and we don't have one here. Also, you would then be able to later change it back
to "pick", so we would have to remember that this isn't allowed for this
particular drop entry; that's messy, so just disallow all editing.
2023-04-15 08:36:03 +02:00
Stefan Haller dc4e88f8a4 Make moving todo commits more robust 2023-04-15 08:36:03 +02:00
Stefan Haller 120dd1530a Make EditRebaseTodo more robust
It used to work on the assumption that rebasing commits in lazygit's model
correspond one-to-one to lines in the git-rebase-todo file, which isn't
necessarily true (e.g. when users use "git rebase --edit-todo" at the custom
command prompt and add a "break" between lines).
2023-04-15 08:36:03 +02:00
Stefan Haller 227b0b781c Show update-ref commands in rebase todo list
This is useful when working with stacked branches, because you can now move
"pick" entries across an update-ref command and you can tell exactly which
branch the commit will end up in.

It's also useful to spot situations where the --update-refs option didn't work
as desired. For example, if you duplicate a branch and want to rebase only one
of the branches but not the other (maybe for testing); if you have
rebase.updateRefs=true in your git config, then rebasing one branch will move
the other branch along. To solve this we'll have to introduce a way to delete
the update-ref entry (maybe by hitting backspace?); this is out of scope for
this PR, so for now users will have to type "git rebase --edit-todo" into the
custom command prompt to sort this out.

We will also have to prevent users from trying to turn update-ref commands into
other commands like "pick" or "drop"; we'll do this later in this branch.
2023-04-15 08:36:03 +02:00
Stefan Haller 740474c10c Visualize branch heads in commits panel
Useful when working with stacked branches.
2023-04-15 08:36:03 +02:00
Stefan Haller c53c5e47ef Store commit.Action as an enum instead of a string
The main reason for doing this (besides the reasons given for Status in the
previous commit) is that it allows us to easily convert from TodoCommand to
Action and back. This will be needed later in the branch. Fortunately,
TodoCommand is one-based, so this allows us to add an ActionNone constant with
the value 0.
2023-04-15 08:36:03 +02:00
Stefan Haller 188773511e Store commit.Status as an enum instead of a string
This is unrelated to the changes in this PR, but since we are doing the same
thing for the commit.Action field in the next commit, it makes sense to do it
for Status too for consistency. Modelling this as an enum feels more natural
than modelling it as a string, since there's a finite set of possible values.
And it saves a little bit of memory (not very much, since none of the strings
were heap-allocated, but still).
2023-04-15 08:36:03 +02:00
Jesse Duffield bd62b519de
Merge pull request #2496 from jesseduffield/feature/prevent-history-custom-command 2023-04-13 21:25:35 +10:00
Luka Markušić 2b4ac986a2 Don't add custom command to history if it starts with space
Add tests for custom command with leading space
2023-04-13 21:20:46 +10:00
Stefan Haller 046b0d9daa Show warning about deprecated edit configs
We print this to the terminal after lazygit quits rather than showing it in a
panel at startup, so as to not annoy people too much. Hopefully it will still be
prominent enough this way.
2023-04-13 13:14:00 +02:00
Stefan Haller 08d679c3a8 Remove line number support for "open" command
The "open" command is supposed to behave in the same way as double-clicking a
file in the Finder/Explorer. The concept of jumping to a specific line in the
file doesn't make sense for this; use "edit" instead.
2023-04-13 13:14:00 +02:00
Stefan Haller 659d668e16 Implement edit presets 2023-04-13 13:14:00 +02:00
Jesse Duffield a02b54e1b7
Merge pull request #2497 from stefanhaller/fix-initial-scroll-bar-size 2023-04-02 16:38:07 +10:00
Stefan Haller d508badd62 Better error message when trying to amend a commit other than head during rebase 2023-04-01 08:16:15 +02:00
Luka Markušić e7d0116312 Allow amending the head commit during interactive rebase 2023-04-01 08:16:15 +02:00
Stefan Haller 85fdb700ba Extract amendHead function into new AmendHelper 2023-04-01 08:16:15 +02:00
Stefan Haller c757063264 Better error message when trying to edit or move a non-todo commit during rebase
Previously we would have tried to do the rebase, resulting in a long and
somewhat cryptic error message from git; now we check ourselves and show a less
intimidating message.
2023-04-01 08:16:15 +02:00
Stefan Haller b24955063c Allow rewording the head commit during interactive rebase 2023-04-01 08:16:15 +02:00
Stefan Haller c6930e0538 Cleanup: use commit.isTODO() consistently
It seems cleaner than checking the Status for "rebasing".
2023-04-01 08:16:15 +02:00
Jesse Duffield 213ae8dd07 fix reflog text colour by defaulting every view to the same foreground colour 2023-03-26 15:24:09 +11:00
Jesse Duffield 4780953cef
Merge pull request #2377 from shinhs0506/clear-staging-after-commit 2023-03-24 19:13:00 +11:00
Jesse Duffield 8121a0cc74 remove old integration test recording code 2023-03-24 18:42:11 +11:00
Stefan Haller 4adca84d68 Make sure scrollbars have the right size initially
We refresh the view after reading just enough to fill it, so that we see the
initial content as quickly as possible, but then we continue reading enough
lines so that we can tell how long the scrollbar needs to be, and then we
refresh again. This can result in slight flicker of the scrollbar when it is
first drawn with a bigger size and then jumps to a smaller size; however, that's
a good tradeoff for a solution that provides both good speed and accuracy.
2023-03-21 18:26:18 +01:00
Stefan Haller b7c61aa883 Push initial context instead of just putting it in the context array
This makes sure activateContext gets called on it.
2023-03-20 20:14:13 +11:00
Stefan Haller 40f6767cfc Avoid deactivating and activating when pushing the current context again
When calling PushContext, do nothing if the context to be pushed is already on
top of the stack. Avoids flicker in certain situations.
2023-03-20 20:14:13 +11:00
John Shin 776d8f4d2e refresh the staging panel on successful commit
apply formatting
2023-03-20 20:13:59 +11:00
Jesse Duffield 4b67a45a16
Merge pull request #2515 from stefanhaller/fix-deprecated-rand-seed 2023-03-20 20:12:25 +11:00
Jesse Duffield a82d952f48
Merge pull request #2495 from jesseduffield/feature/remove-altreturn 2023-03-20 20:11:35 +11:00
Stefan Haller 549ce09f71 Fix deprecated rand.Seed 2023-03-19 10:00:19 +01:00
Jesse Duffield 60f902f026 rename patch manager to patch builder 2023-03-19 16:35:57 +11:00
Jesse Duffield 73c7dc9c5d refactor patch code 2023-03-19 16:30:39 +11:00
Jesse Duffield e6274af015
appease golangci-lint (#2512) 2023-03-19 11:20:29 +11:00
Jens Kutilek 5c8bc790ff
Make arrows consistent (#2501) 2023-03-18 11:32:44 +11:00
yk-kd b5d612e6d6
Add border config (#2344)
Co-authored-by: yk-kd <yosuke.komada@gmail.com>
2023-03-18 11:23:31 +11:00
Luka Markušić f314cb3763 Remove alternative confirmation and return keymappings 2023-03-09 10:32:00 +01:00
Stefan Haller 4bd1322941 Rename WillBeAppliedReverse to Reverse
This is the only "reverse"-related option that is left, so use a less clumsy
name for it.
2023-03-07 13:40:07 +01:00
Stefan Haller 45cf993982 Remove the PatchOptions.Reverse option
All callers pass false now (except for the tests, which we simply remove), so we
don't need the option any more.
2023-03-07 13:39:45 +01:00
Stefan Haller e4659145e8 Use WillBeAppliedReverse (and git apply --reverse) in the staging panel too
It's simpler to have only one way of reversing a patch.
2023-03-07 13:38:19 +01:00
Stefan Haller 6bd1c1d068 Remove parameters that are no longer needed
All callers in this file now use reverseOnGenerate=false and
keepOriginalHeader=true, so hard-code that in the call to ModifiedPatchForLines
and get rid of the parameters.
2023-03-07 09:49:34 +01:00
Stefan Haller 9cc33c479b Use forward patches and --reverse flag for partial patches too
There's no reason to have two different ways of applying patches for whole-file
patches and partial patches; use --reverse for both. Not only does this simplify
the code a bit, but it fixes an actual problem: when reverseOnGenerate and
keepOriginalHeader are both true, the generated patch header is broken (the two
blobs in the line `index 6d1959b..6dc5f84 100644` are swapped). Git fails to do
a proper three-way merge in that case, as it expects the first of the two blobs
to be the common ancestor.

It would be possible to fix this by extending ModifiedPatchForLines to swap the
two blobs in this case; but this would prevent us from concatenating all patches
and apply them in one go, which we are going to do later in the branch.
2023-03-07 09:49:34 +01:00
Stefan Haller f76cc27956 Bundle the reverse and keepOriginalHeader flags into a PatchOptions struct
We are going to add one more flag in the next commit.

Note that we are not using the struct inside patch_manager.go; we keep passing
the individual flags there. The reason for this will become more obvious later
in this branch.
2023-03-07 09:49:34 +01:00
Jesse Duffield c36333af3d
Merge pull request #2433 from Ryooooooga/subcommits-limit 2023-03-06 18:22:57 +11:00
Stefan Haller 723504a290 Keep side context in context stack when pushing a main context
This fixes accordion mode for the commit files panel. When entering a file, the
commit files panel should stay expanded.
2023-03-04 15:07:48 +01:00
Stefan Haller de3e4838ad Store WorkingTreeState in model
This is the working tree state at the time the model commits were loaded. This
avoids a visual glitch with the "You Are Here" label appearing at times when it
is not supposed to.
2023-03-01 09:12:00 +01:00
Stefan Haller 6af8f278d0 Don't put "<--- YOU ARE HERE" in the commit model's name
Instead, derive it from context at display time (if we're rebasing, it's the
first non-todo commit). This fixes the problem that unfolding the current
commit's files in the local commits panel would show junk in the frame's title.

Along the way we make sure to only display the "<--- YOU ARE HERE" string in the
local commits panel; previously it would show for the top commit of a branch or
tag if mid-rebase.
2023-03-01 09:12:00 +01:00
Jesse Duffield af7c71d1ee
Merge pull request #2476 from pereBohigas/feature/add_kotlin_icon 2023-02-28 10:11:47 +11:00
Ryooooooga a624e0457f
feat(subcommits): load unlimited sub-commits 2023-02-27 15:29:00 +09:00
Pere Bohigas adef3bd4ca Add icon for Kotlin script files 2023-02-25 15:14:26 +01:00
Jesse Duffield dd1bf629b8 migrate patch building tests 2023-02-25 21:37:16 +11:00
Pere Bohigas c80a94aa7a Add icon for Kotlin files 2023-02-25 10:51:43 +01:00
Jesse Duffield 037e957282 fix PullMergeConflict integration test 2023-02-25 11:39:24 +11:00
Jesse Duffield db011d8e34 Improve staging panel integration tests 2023-02-25 11:35:41 +11:00
Jesse Duffield 78f3a7a478 migrate interactive rebase integration tests 2023-02-22 19:36:31 +11:00
Jesse Duffield 56424eb1aa remove x keybinding for opening menu so we now only use '?' 2023-02-20 19:28:45 +11:00
Jesse Duffield 38c7030b0f mention path in tooltips 2023-02-20 19:28:45 +11:00
Luka Markušić 31b8524fe6 Add tooltips for discarding 2023-02-20 19:28:45 +11:00
Luka Markušić 0ae34aeeb7 Make discarding items less error prone
The menu is opened by `d` so this makes it harder to mess things up by
accidentally pressing `dd`.
2023-02-20 19:28:45 +11:00
Jesse Duffield e1c376ef54
Merge pull request #2453 from stefanhaller/allow-rebasing-to-first-commit 2023-02-20 19:21:37 +11:00
Jesse Duffield 0b55eaca1d add create tag from commit test 2023-02-20 19:01:08 +11:00
Jesse Duffield 39c56553b3 show tag message 2023-02-20 19:01:08 +11:00
Stefan Haller c5cd217a65 Allow squashing fixups above the first commit of a repo
This includes amending changes into a given commit, since that's implemented in
terms of the former.
2023-02-20 08:29:43 +01:00
Jesse Duffield 9e1e20fef2
Merge pull request #2421 from Ryooooooga/tag-on-branch 2023-02-20 18:20:16 +11:00
Stefan Haller dd61c49a15 Better error message for trying to squash or fixup the first commit
It's not so much the total number of commits that matters here, it's just
whether we are on the first one. (This includes the other condition.)

This allows us to get rid of the condition in rebase.go.
2023-02-20 07:40:04 +01:00
Ryooooooga 67b08ac239
feat: support to create tag on branch 2023-02-19 23:31:46 +09:00
Stefan Haller 67b8ef449c Edit by breaking after current commit
Instead of rebasing from the commit below the current one and then setting the
current one to "edit", we rebase from the current one and insert a "break" after
it. In most cases the behavior is exactly the same as before, except that the
new method also works if the current commit is a merge commit. This is useful if
you want to create a new commit at the very beginning of your branch (by editing
the last commit before your branch).
2023-02-19 10:21:01 +01:00
Jesse Duffield 65bd0ab431 migrate undo test 2023-02-19 15:48:09 +11:00
Jesse Duffield a51f64814c show snapshot of lazygit when test fails for easier investigation 2023-02-19 15:48:09 +11:00
Jesse Duffield bff076c70a rename key to Pull 2023-02-19 11:42:00 +11:00
stk 4d39668743 Undo a change made in #2444 that we didn't end up needing 2023-02-18 09:53:31 +01:00
Jesse Duffield c517d1e0a2 update view cursor when selecting new line in patch explorer view 2023-02-18 10:19:34 +11:00
stk 8cad8cda8f Don't bother setting view cursor pos for staging/stagingSecondary views
Now that the cursor highlight is never shown (see previous commit), there's no
reason to update the cursor position any more.
2023-02-15 21:32:21 +01:00
stk 6b81e6adca Turn highlighting off in staging/stagingSecondary views
There are two reasons for doing this:
1. The view cursor position is often out of sync with the selected line; see
   first commit of this branch.
2. The highlighting is already turned off when the view loses focus, and never
   turned back on thereafter. So just turn it off from the start then.
2023-02-15 21:29:38 +01:00
stk b499eba1a8 Select next stageable line correctly after staging a range of lines
We already have this very convenient behavior of jumping to the next stageable
line after staging something. However, while this worked well for staging
single lines or hunks, it didn't work correctly when staging a range of lines;
in this case we want to start searching from the first line of the range.
2023-02-15 21:29:00 +01:00
stk ff2a799200 Make SelectedLine/SelectedLineIdx work in staging/stagingSecondary views
While we try to keep the view's cursor position in sync with the context state's
selectedLineIdx (at least when pressing up or down), there are enough situations
where the two run out of sync; for example when initially opening the view, or
after staging a hunk, or when scrolling the view using the wheel. While it would
be possible to fix these situations to keep them always in sync, it doesn't seem
worth it, because the view's cursor position isn't really used for anything
else. So we rather special-case the SelectedLine/SelectedLineIdx functions of
ViewDriver to query the context state's selectedLineIdx directly if it is a
patch explorer context.
2023-02-15 21:22:11 +01:00
Ryooooooga 39c20bc634
chore: change to work return-alt1 on all views 2023-02-11 21:19:47 +09:00
Jesse Duffield 823d95a8c6
Merge pull request #2418 from jesseduffield/feature/copy-remote-branch-to-clipboard 2023-02-11 10:53:31 +11:00
Jesse Duffield 225cd3cc60
Merge pull request #2412 from Ryooooooga/disable-help-on-suggestions 2023-02-11 10:52:49 +11:00
Ryooooooga 984eb95cb7
chore: remove UNKNOWN_VIEW_ERROR_MSG 2023-02-10 21:26:51 +09:00
Ryooooooga 1be6c522d8
fix: disable menu key binding while displaying popup 2023-02-09 20:13:41 +09:00
Luka Markušić 8af59c3e6e Copy remote branch name to clipboard 2023-02-09 11:56:12 +01:00
Jesse Duffield 4f7324bad0
Merge pull request #2413 from stefanhaller/allow-ignore-whitespace-everywhere 2023-02-09 21:55:12 +11:00
Jesse Duffield 5e2254395a fix linting issue 2023-02-09 21:45:14 +11:00
stk 5bb6198219 Allow ignoring whitespace in diff in commits panel 2023-02-07 12:14:29 +01:00
stk bbaeab68e1 Better redrawing after toggling "ignore whitespace"
There's no need for refreshing anything; all that's needed is to re-focus the
selected list item. This way it will also work in other panels, which we are
about to add in the next commit.
2023-02-07 12:09:17 +01:00
stk d838965a41 Make "Toggle whitespace in diff view" a global key binding
Since it is going to affect a number of views later in the branch, it's easier
to make it global than to find all views that are affected.
2023-02-07 09:25:38 +01:00
Ryooooooga 7bd0c779c7
fix: fix default color to be white 2023-02-03 23:36:59 +09:00
Jesse Duffield c0e805718d
Merge pull request #2358 from phanithinks/#2319_default_screen_mode 2023-02-01 21:52:09 +11:00
Jesse Duffield 368d6437b8
Merge pull request #2373 from phanithinks/clipboard_patch_option_2357 2023-01-31 17:02:46 +11:00
Phanindra Kumar Paladi 01f0efb997
Merge branch 'master' into #2319_default_screen_mode 2023-01-29 10:25:14 +05:30
Phanindra kumar Paladi df58c75ca4 Fixed breaking integrtion tests(old) 2023-01-29 10:03:59 +05:30
stk 67fb28e2b8 Add user config gui.skipRewordInEditorWarning 2023-01-26 09:01:22 +01:00
stk b8d33b8f7b Extract helper function doRewordEditor
No behavior change, just a preparation for the next commit.
2023-01-22 15:59:32 +01:00
Phanindra kumar Paladi 946b8b5670 Fixed the lable in the custom_patch_options_panel.go 2023-01-18 21:13:31 +05:30
Phanindra kumar Paladi 265cdde7bc Fixed typo 2023-01-18 10:14:48 +05:30
Phanindra kumar Paladi e87fc4a229 Change key of clipboard copy 2023-01-18 05:50:47 +05:30
Phanindra kumar Paladi f6f82091bc Added copy to clipboard option to the patch options 2023-01-17 09:07:07 +05:30
Phanindra kumar Paladi a11e91e651 replaced 'screenMode' to 'windowSize' in config 2023-01-16 20:07:21 +05:30
Phanindra kumar Paladi f4ccb68464 Added screenMode configuration to gui configuration 2023-01-11 16:51:46 +05:30
Ryooooooga 00b922604a
fix: fix goroutine leaks 2023-01-06 10:51:09 +09:00
Jesse Duffield 5c42e1a5dc defend against possible nil function 2022-12-30 22:49:08 +11:00
Ryooooooga cd9111837e
feat: add GitVersion struct 2022-12-30 20:01:14 +09:00
Ryooooooga 41222f07ed
chore(gui): remove unused gitConfig 2022-12-30 20:01:14 +09:00
Jesse Duffield 1da0427e3a appease linter 2022-12-30 12:18:59 +11:00
Jesse Duffield af5b3be286 integrate snake game into lazygit 2022-12-30 12:18:59 +11:00
Jesse Duffield f3fa9ec2d1
Merge pull request #2311 from wakaka6/add_return_alt1 2022-12-28 11:54:16 +11:00
Jesse Duffield ed93e0a2b0 remove dependency on model 2022-12-27 22:52:20 +11:00
Jesse Duffield fb15a2f4f8
Merge pull request #2326 from Ryooooooga/fix-scroll
fix https://github.com/jesseduffield/lazygit/issues/2309
2022-12-24 19:20:23 +11:00
Jesse Duffield fa97b0c76e move background code into its own file 2022-12-24 19:14:52 +11:00
Jesse Duffield 5c11b1ecb7 discard changes integration test 2022-12-24 19:05:46 +11:00
Jesse Duffield 57a1817deb don't kill long-running sandbox sessions 2022-12-21 22:51:39 +11:00
Ryooooooga 7bdba1abe4
fix(#2309): fix diff scroll 2022-12-20 22:25:49 +09:00
Jesse Duffield dde70486a1 apply user config changes in sandbox mode 2022-12-20 23:07:43 +11:00
Jesse Duffield 5679efe174
Merge pull request #2239 from bdach/u2f-key-prompts
close https://github.com/jesseduffield/lazygit/issues/2230
2022-12-20 21:44:29 +11:00
wakaka6 6386a03805 add return alt1 2022-12-11 15:44:25 +08:00
Arnaud PERALTA 0af63daf18 workingtree controller fixed with new references for commit in staged menu 2022-12-01 09:12:18 +11:00
Arnaud PERALTA 8b894d7bf5 wip: commit logic in helper and reported in files/staging controllers 2022-12-01 09:12:18 +11:00
Jesse Duffield 65d6d7fb2d fix ignore file keybinding 2022-11-30 19:36:35 +11:00
Bartłomiej Dach 1a1f042f49 Add credential prompts for U2F-backed SSH keys
The 8.2 release of OpenSSH added support for FIDO/U2F hardware
authenticators, which manifests in being able to create new types of SSH
key, named `ecdsa-sk` nad `ed25519-sk`. This is relevant to lazygit,
as those SSH keys can be used to authorise git operations over SSH, as
well as signing git commits. Actual code changes are required for
correct support, as the authentication process for these types of keys
is different than the process for types supported previously.

When an operation requiring credentials is initialised with a U2F
authenticator-backed key, the first prompt is:

	Enter PIN for ${key_type} key ${path_to_key}:

at which point the user is supposed to enter a numeric (and secret) PIN,
specific to the particular FIDO/U2F authenticator using which the SSH
keypair was generated. Upon entering the correct key, the user is
supposed to physically interact with the authenticator to confirm
presence. Sometimes this is accompanied by the following text prompt:

	Confirm user presence for key ${key_type} ${key_fingerprint}

This second prompt does not always occur and it is presumed that the
user will know to perform this step even if not prompted specifically.
At this stage some authenticator devices may also begin to blink a LED
to indicate that they're waiting for input.

To facilitate lazygit's interoperability with these types of keys, add
support for the first PIN prompt, which allows "fetch", "pull", and
"push" git operations to complete.
2022-11-30 13:34:32 +11:00
Luka Markušić b3d086bdc1 Resolve the prompt just before using it
In case a later command depends on a prompt input from a previous one we
need to evaluate it only after the previous prompt has been confirmed.
2022-11-25 22:46:36 +01:00
Jesse Duffield de22238589
Merge pull request #2224 from Ryooooooga/ambiguous-branch 2022-11-14 19:09:37 +11:00
Ryooooooga 52a2e4c1dc fix: fix ambiguous branch name
test: add an integration test for checkout branch by name

fix: fix full ref name of detached head

refactor: refactor current branch loader

chore: use field name explicitly
2022-11-14 19:05:07 +11:00
Jesse Duffield e953659ebf
Merge pull request #2273 from artvi/fix/show_loading_state_when_bottomline_disabled 2022-11-14 19:01:26 +11:00
Jesse Duffield b33ec5a050
Merge pull request #1980 from ajhynes7/stash-untracked-changes 2022-11-14 18:46:53 +11:00
sudoburt 3e73dacce3 Merge loaders package into git_commands package 2022-11-14 18:11:45 +11:00
Andrew Hynes 684d1e955e lint: try deleting blank line 2022-11-13 19:51:30 -03:30
Art V c53752a5f9 [#2258] hide options panel when showBottom line is disabled 2022-11-14 01:04:56 +03:00
Art V dc163bfc4d [#2258] show bottom line when having status 2022-11-14 00:53:55 +03:00
Andrew Hynes 3c436b3457 lint: delete unused argument from handleStashSave 2022-11-13 11:02:06 -03:30
Jesse Duffield a905a28e41 better hiding of underscores 2022-11-13 14:46:13 +11:00
Jesse Duffield 5964472ec1 hide underscores more 2022-11-13 14:41:43 +11:00
Jesse Duffield d26350502c stop switching focus to commits view when resetting 2022-11-13 03:26:50 +00:00
Jesse Duffield 863a65cf94 disable underscores in vscode while we wait for underscore glitch to be fixed 2022-11-13 13:41:49 +11:00
Jesse Duffield 91f83c6be7 use better colour defaults 2022-11-12 18:09:16 -03:30
Jesse Duffield 97ced9e14f fix could-not-access error 2022-11-12 18:09:15 -03:30
Jesse Duffield 1ac3ae1ad1 use better colour defaults 2022-11-12 14:59:15 +11:00
Jesse Duffield e8b97c9fe2 fix could-not-access error 2022-11-11 12:30:14 +11:00
Andrew Hynes a47e72892a
Merge branch 'master' into stash-untracked-changes 2022-11-01 16:08:34 -02:30
Ryooooooga 14ec0cd92e
feat: allow null in keybindings 2022-10-18 22:20:03 +09:00
Ryooooooga 3103398e31
chore: refactor rename stash 2022-10-16 09:30:04 +09:00
Ryooooooga eceb3a5aa6
chore: refactor rename stash 2022-10-16 09:12:43 +09:00
Ryooooooga 11316b7a48
feat: add rename stash 2022-10-16 09:12:42 +09:00
Ryooooooga 0c3eab4059
fix: fix initial origin of commit message panel 2022-10-15 20:09:23 +09:00
Ryooooooga d90fedfbf8
feat: add stash icon 2022-10-14 21:58:58 +09:00
Jesse Duffield dba0edb998 use boxlayout from lazycore 2022-10-09 08:31:14 -07:00
Andrew Hynes 8c46a0110d
Merge branch 'master' into stash-untracked-changes 2022-10-06 22:59:06 -02:30
Ryooooooga e436922eb6
feat(editors.go): move by words 2022-10-05 22:29:55 +09:00
Jesse Duffield ed98b60078 use thread safe map 2022-10-02 20:57:44 -07:00
Jesse Duffield e76fa5a6cb fix glitchy render of stale data when flicking through files and directories 2022-10-02 20:41:24 -07:00
Jesse Duffield c953871ec7 use lowercase 'quote' for consistency with existing custom command template functions 2022-10-02 18:43:25 -07:00
Ryooooooga 19df238b77
feat: allow OSCommand.Quote to be invoked within a custom command 2022-09-30 21:16:45 +09:00
Jesse Duffield 90feb4bae6
Merge pull request #1636 from kawaemon/partially-fix-1629 2022-09-24 10:15:23 -07:00
Jesse Duffield 1d40bd1707
Merge pull request #2104 from LiamKearn/feat-emacs-char-nav 2022-09-24 10:08:13 -07:00
kawaemon 17df42e517 fix: scan to buffer to empty character input in stdin 2022-09-23 23:42:45 -07:00
Jesse Duffield fd66499c8f
Merge pull request #2167 from xiaoliwang/remove_deprecated 2022-09-23 23:01:40 -07:00
Ryooooooga 212e19f598
feat: add support for emacs keybindings 2022-09-24 00:00:30 +09:00
jiepeng bc8050d8ac typo 2022-09-17 15:10:41 -07:00
jiepeng b8900baf1a remove deprecated calls 2022-09-17 15:10:41 -07:00
Mihai22125 7e9dffe1b9 Add Key field to CustomCommandPrompt struct
Add Form field to CustomCommandObjects struct

Write user prompts responses to Form field

Ensure that map keys exists

Add form prompts integration test

Remove redundant index
2022-09-17 14:58:44 -07:00
Jesse Duffield a92f0f7c89 increase recording leeway 2022-09-17 10:50:04 -07:00
Jesse Duffield 74acb3e86a add integration tests for cherry picking 2022-09-16 22:15:16 -07:00
Jesse Duffield 7af7af27c6 various changes to improve integration tests 2022-09-16 08:42:39 -07:00
Andrew Hynes e189546acb refactor: move checks for clean working tree 2022-09-15 21:48:49 -02:30
Andrew Hynes c7733aa5e5 refactor: rename method to StashIncludeUntrackedChanges 2022-09-15 21:48:49 -02:30
Andrew Hynes 50cf7ac5bc refactor: change command order 2022-09-15 21:48:49 -02:30
Andrew Hynes c7fd218308 fix: add condition to if statement 2022-09-15 21:48:49 -02:30
Andrew Hynes 7ddb80a13e feat: add stash option to include untracked changes 2022-09-15 21:48:48 -02:30
Jesse Duffield 010f430d1f add bisect integration test 2022-09-09 20:55:47 -07:00
Ryooooooga eb9fbb0a33
fix(confirmation_panel.go): fix initial origin of editor box 2022-09-01 19:44:17 +09:00
Jesse Duffield 448ff80d7d
Merge pull request #2123 from Ryooooooga/feature/edit-initial-scroll 2022-08-31 22:43:06 -07:00
Ryooooooga 3ada4dde12
fix: fix initial scroll position of edit box 2022-08-18 23:39:15 +09:00
nullishamy 21a4522a51
Merge branch 'master' into feat/detect-bare-repo 2022-08-15 14:00:34 +01:00
nullishamy 154bd975a6
Apply refactoring suggestions 2022-08-15 13:59:34 +01:00
Jesse Duffield 53979f7cec a more complex custom command test 2022-08-14 20:49:20 +10:00
Jesse Duffield 39e9266089
Merge pull request #2110 from mark2185/fix-ignore-or-exclude-file-menu 2022-08-14 17:35:35 +10:00
Jesse Duffield 304d74370e refactor to ensure code doesn't depend on integration code 2022-08-13 13:56:50 +10:00
Jesse Duffield faed509bfd fix CI 2022-08-13 13:56:50 +10:00
Jesse Duffield ba96baee32 move code from main into app package to allow test to be injected 2022-08-13 13:55:08 +10:00
Jesse Duffield d890238c7b move input and assert into integration tests package 2022-08-13 13:52:13 +10:00
Jesse Duffield 46ae55f91e introduce gui adapter 2022-08-13 13:51:56 +10:00
Luka Markušić 0ff5b74d80 IgnoreOrExclude should be a menu 2022-08-11 14:23:02 +02:00
Jesse Duffield 225c563c63 another integration test 2022-08-11 21:24:16 +10:00
Jesse Duffield 77881a9c7d add new integration test pattern 2022-08-11 21:24:15 +10:00
lkearn 6422b399e7 Feat: Add emacs character navigation, because I'm weird like that :) 2022-08-09 17:58:43 +10:00
Jesse Duffield e4e04cfa8f fix hidden suggestions 2022-08-07 19:20:02 +10:00
Jesse Duffield d73a236d7c allow rendering to main panels from anywhere 2022-08-07 12:05:51 +10:00
Jesse Duffield 755ae0ef84 add deadlock mutex package
write to deadlock stderr after closing gocui

more deadlock checking
2022-08-07 11:16:14 +10:00
Jesse Duffield 7410acd1aa move merge conflicts code into controller 2022-08-07 11:16:03 +10:00
Jesse Duffield 445a625b56 rename merging context to mergeConflicts 2022-08-06 18:05:00 +10:00
Jesse Duffield 54fb73080a use ptmx map so that we can have multiple ptmx's stored for resizing 2022-08-06 13:49:11 +10:00
Jesse Duffield 524bf83a4a refactor to only have one context per view 2022-08-06 13:49:11 +10:00
Jesse Duffield c1c6e2fac2 make exception for searching from menu 2022-08-02 09:16:01 +10:00
Jesse Duffield 3ee2ad511e prevent crash when opening recent repos panel if no recent repos are present 2022-08-01 22:10:08 +10:00
Jesse Duffield debc58b6c5 fix popup focus issue 2022-08-01 22:09:48 +10:00
Jesse Duffield fab2e14b55 fix issue caused by opening a menu over a prompt 2022-08-01 21:38:57 +10:00
Jesse Duffield 95426c5e46 handle nil properly with file nodes 2022-08-01 20:32:01 +10:00
Jesse Duffield 682be18507 refactor to use generics for file nodes
use less generic names
2022-07-31 19:43:14 +10:00
Jesse Duffield 2ca2acaca5
Merge pull request #2072 from jesseduffield/optimistic-file-rendering 2022-07-31 19:31:23 +10:00
Jesse Duffield 5f4c29d7b5
Merge pull request #2005 from mark2185/feature/recent-repos-path
Show active branch for recent repo
2022-07-31 19:30:30 +10:00
Luka Markušić 44de380c2b Add i18n for unknown branch 2022-07-31 08:57:57 +02:00
Luka Markušić 37bdbd9a21 Display short SHA when in detached HEAD state 2022-07-31 08:51:27 +02:00
Luka Markušić 767ef31661 Use filepath.Join instead of manual concat 2022-07-31 08:43:31 +02:00
Jesse Duffield c81c046615
Merge pull request #2059 from sportshead/master 2022-07-31 16:19:59 +10:00
Jesse Duffield 7077ea428f add optimistic rendering for staging and unstaging files 2022-07-31 14:34:57 +10:00
sportshead f2880ecb46 Add empty output message and refreshing to showOutput 2022-07-31 12:04:40 +08:00
Luka Markušić 966733240c Refactor a bit, enable worktrees 2022-07-30 19:02:19 +02:00
Luka Markušić 25ddac0d8f Gotta go fast 2022-07-30 17:42:15 +02:00
Luka Markušić 7c09ce3871 Parallelize fetching current branch 2022-07-30 17:05:17 +02:00
Luka Markušić e6e4513f45 Show active branch for recent repo
Split recent repo menu into three columns
2022-07-30 17:05:17 +02:00
Luka Markušić 9c6239df3d Worktrees should not be filtered out
But non-git directories should
2022-07-30 17:03:30 +02:00
Jesse Duffield ab5a8091f5 add better support for OpensMenu option when creating a menu 2022-07-30 20:27:51 +10:00
Jesse Duffield 95678b1b43
Merge pull request #2065 from jesseduffield/fix-rewording-merge-commit-with-editor
Fix rewording a merge commit with editor
2022-07-30 19:51:59 +10:00
Luka Markušić cc377b5c49 Fix rewording a merge commit with editor 2022-07-30 08:43:42 +02:00
Luka Markušić 1f482e585e Fix github linter errors 2022-07-30 08:10:29 +02:00
sportshead e1f41b653c Add showOutput option to custom commands (#1163) 2022-07-28 18:40:30 +08:00
Jesse Duffield c087dca60a
Merge pull request #2027 from jesseduffield/gozes-jesse
Attempt at fixing CI
2022-07-05 19:37:09 +10:00
Juan Sanchez Montalvo 11d766053e Allow adding a file to the .git/info/exclude file 2022-07-05 19:33:44 +10:00
Michael Mead 9d304098bb feat: add confirm prompt for custom keybindings
- Supports configuring a custom confirmation prompt via `config.yml` for
  custom keybindings. A new `CustomCommandPrompt.Body` field is
  used to store the immutable body text of the confirmation popup.
- Adds a sample 'confirm' prompt to the example `config.yml`.
- Updates the `Prompts` section of the documentation to include
  'confirm' prompt type and also describe which fields pertain to it
  (i.e. `initialValue`).

Closes: https://github.com/jesseduffield/lazygit/issues/1858

Signed-off-by: Michael Mead <mmead.developer@gmail.com>
2022-07-04 11:36:13 -07:00
Jesse Duffield 02c5559704 run integration tests in parallel and properly cache windows build 2022-06-11 13:06:29 +10:00
Jesse Duffield 32c0b39dbd
Merge pull request #1950 from HiromasaNojima/add_subcommand_into_specific_layout_directly 2022-06-11 11:51:14 +10:00
Jesse Duffield b1e4968d0b allow opening lazygit to a specific panel 2022-06-11 11:23:56 +10:00
Luka Markušić a955dbcfd7 Validate recent repo before blindly opening it 2022-06-11 09:42:51 +10:00
Jesse Duffield de3114edc3
Merge pull request #1972 from lei4519/feature/display-whole-graph-by-default 2022-06-09 20:17:25 +10:00
Jesse Duffield cdec70cc06
Merge pull request #1975 from mark2185/fix-unmatching-remote-branch-name 2022-06-09 20:12:56 +10:00
Jesse Duffield 9591cc381a support setting the author of a commit
update copy
2022-06-09 19:12:20 +10:00
Luka Markušić 55a941d5dc Fetch the correct remote branch 2022-06-01 20:35:09 +02:00
Lay 684ea284af fix: lint error 2022-05-30 23:19:48 +08:00
Lay 666180cfd0 Add config param that displays the whole git graph by default 2022-05-30 13:52:39 +08:00
Jesse Duffield 8fd9dea641
Merge pull request #1936 from Ryooooooga/feature/tab-i18n 2022-05-18 22:24:45 +10:00
Jesse Duffield e1e16a34da
Merge pull request #1948 from Ryooooooga/feature/time-format 2022-05-18 22:20:51 +10:00
Ryooooooga bfefef92a6
chore(i18n): move InitialViewTabContextMap to gui package 2022-05-18 21:09:48 +09:00
Ryooooooga 5275161a88
chore(i18n): localize panel titles 2022-05-18 20:55:42 +09:00
Ryooooooga e57931f56d
test: fix timezone for time format tests 2022-05-18 20:55:29 +09:00
Ryooooooga 1f1d871837
feat: add ability to customize time format 2022-05-18 20:55:27 +09:00
Ryooooooga 9693afd671
fix: fix lint error 2022-05-18 20:34:35 +09:00
Jesse Duffield f31dcd3091
Merge pull request #1930 from mark2185/feature/discard-staged-only 2022-05-15 20:33:25 +10:00
Luka Markušić 241d182da7 Make tooltip i18n-able 2022-05-15 12:16:20 +02:00
Jesse Duffield 8e7f6822fc
Merge pull request #1944 from Ryooooooga/feature/fix-ambiguous-refname 2022-05-15 19:45:30 +10:00
Jesse Duffield 73491fed25
Merge pull request #1927 from HiromasaNojima/option_always_show_unstaged_staged_panels 2022-05-15 19:24:56 +10:00
Jesse Duffield d72ffdc4a7 refactor 2022-05-15 19:10:04 +10:00
Ryooooooga 61970a4439
fix: fix ambiguous refname 2022-05-13 21:05:51 +09:00
Luka Markušić ca191159f5 Discard staged changes only 2022-05-08 14:24:28 +02:00
HiromasaNojima 1ef585969f add option to always show unstaged/staged panels 2022-05-08 17:24:55 +09:00
Jesse Duffield e67fef776b add author email to commits 2022-05-08 14:26:18 +10:00
Jesse Duffield 6f8063217d rename displayString to label for menu items 2022-05-08 14:26:18 +10:00
Jens Pfeifle 7c573a5bea Add command to reset the commit author from the commits panel. 2022-05-08 13:29:56 +10:00
Jesse Duffield 22d98249fe better popup resizing logic 2022-05-08 13:24:36 +10:00
Jesse Duffield f257740ea7 add tooltip view for showing menu item descriptions 2022-05-08 13:24:36 +10:00
Jesse Duffield 517e9445df refactor view definitions 2022-05-08 11:41:13 +10:00
Ryooooooga 540d2e379a
fix: fix collision of Donate and Ask Question 2022-05-07 18:02:09 +09:00
Ryooooooga 04babdfb82
fix: fix the appStatus width calculation 2022-05-07 17:37:53 +09:00
Ryooooooga 265e6d8360
fix: fix the prompt height calculation 2022-05-07 16:36:20 +09:00
Jesse Duffield 3bf0c9ef44 more documentation 2022-05-07 16:02:04 +10:00
Ryooooooga b07e0ea032
fix: fix context of edit hunk 2022-05-06 21:58:40 +09:00
Ryooooooga d458e78d95
feat: add ability to edit hunk 2022-05-06 21:53:00 +09:00
Jesse Duffield 0940e0182b
Merge pull request #1870 from mark2185/feature/stash-unstaged 2022-05-06 20:17:33 +10:00
Jesse Duffield f7fae0b82e
Merge pull request #1869 from mark2185/feature/unset-upstream 2022-05-06 20:14:13 +10:00
Ryooooooga 2eb866fc62
fix: fix a crash when pressing enter in empty commits, reflog, or stash panel 2022-05-05 21:41:44 +09:00
Jesse Duffield 4dd09ee0d5 allow copying commit author to clipboard 2022-05-01 14:14:29 +10:00
Ryooooooga db3568e4f2
chore(gui): remove todo 2022-04-29 17:53:43 +09:00
Ryooooooga 86af186683
feat(file_icons.go): add Cargo.toml icons 2022-04-24 18:23:14 +09:00
Ryooooooga f972d6ae68
feat(gui): show remote icons 2022-04-23 12:25:42 +09:00
Ryooooooga 11d0e7e17d
feat(gui): show branch icons 2022-04-23 12:25:41 +09:00
Ryooooooga cb13fe7f46
feat(gui): show commit icons 2022-04-23 12:25:41 +09:00
Ryooooooga b07aeda5a6
feat(gui): show file icons 2022-04-23 12:25:40 +09:00
Jesse Duffield dfb293c985 better upstream changes presentation 2022-04-18 11:03:28 +10:00
Jesse Duffield 9b947b74a2 allow hiding bottom line 2022-04-18 09:58:36 +10:00
Jesse Duffield 3477cbc81f better weight distribution in window arrangement 2022-04-17 12:48:04 +10:00
Jesse Duffield 2fa6d8037c always show list counts 2022-04-16 17:29:17 +10:00
Jesse Duffield d3b6acf096 restore highlighting of popup messages 2022-04-16 17:29:17 +10:00
Jesse Duffield e68093fe99 add scrollbars 2022-04-16 17:29:17 +10:00
Jesse Duffield b838b74801 do not highlight line if there are no items to display 2022-04-16 15:19:32 +10:00
Jesse Duffield 00afa30ebf better appearance for reverse attribute 2022-04-16 15:19:32 +10:00
Mukhlis Akbarrudin 21336d3aa2 refactor: explicitly add alternative keybinding 2022-04-15 08:23:27 +10:00
Luka Markušić 1ae2dc9941 The four horsemen of stashing 2022-04-14 21:45:55 +02:00
Luka Markušić e114b5b5e8 Refresh BRANCHES and COMMITS after (un)staging upstream 2022-04-13 15:54:32 +02:00
Luka Markušić c4b958e3fd There's gotta be a better way for initial content 2022-04-13 15:21:01 +02:00
Luka Markušić f83308c8df Add option to (un)set upstream for a local branch 2022-04-11 14:04:06 +02:00
Luka Markušić 6f7038c827 Add option to stash only unstaged files 2022-04-10 09:35:59 +02:00
casswedson b7928042f0 chore: typo hunting ft. codespell 2022-04-06 08:52:41 +10:00
Ryooooooga 3b5a019e1a feat(merge_panel): Add open/edit files in merge conflict panel 2022-04-06 08:27:03 +10:00
Ryooooooga 53257db99d fix: fix diff of renamed files 2022-04-06 08:26:13 +10:00
Ryooooooga 954d1a8147 fix commit description 2022-04-02 17:04:42 +11:00
Ryooooooga 09d24ebd1d fix test 2022-04-02 17:04:42 +11:00
Ryooooooga 4835fc00b8 introduce Ref interface 2022-04-02 17:04:42 +11:00
Ryooooooga 86c259623c feat: fix permission problem of temp dirs 2022-04-02 08:48:38 +11:00
Moritz Haase e35ab3c5fe pkg/gui: Use 'alert' popups instead of 'confirm' popups where appropriate
Invocations of 'IPopupHandler::Confirm()' that use neither 'HandleConfirm' nor
'HandleClose' can be replaced by 'Alert()'.
2022-03-30 20:13:43 +11:00
Moritz Haase 8fb2acc224 pkg/gui: Rename IPopupHandler::Ask() to Confirm()
Follow the JavaScript naming scheme for user interaction (alert, prompt,
confirm) as discussed in #1832.
2022-03-30 20:13:43 +11:00
Moritz Haase f2fb6453a1 pkg/gui: Show notification popup when update was successful
Show a proper notification popup once an update has been installed successfully
so the user knows we're done (so far a popup is only shown if an error occurred).
The popup also reminds him to restart lazygit for the changes to take effect.
2022-03-28 09:13:34 +11:00
Moritz Haase b7079634ee i18n: Make user-facing strings in the updater translatable
Convert a number of static (english) user-facing string in the updater code to
translatable ones.
2022-03-28 09:13:34 +11:00
Moritz Haase 9bccc20888 pkg/gui: Add support for 'notification' popups
Add a new 'Notification()' method to 'IPopupHandler' that makes it easier to
show a modal info message to the user. This is simply a convenience wrapper
around 'Ask()', so the popup can be closed using both 'Enter' and 'ESC'.
2022-03-28 09:13:34 +11:00
Jesse Duffield b3636a537b reduce glitchiness of patch building mode 2022-03-27 19:18:07 +11:00
Jesse Duffield 7c3d14ee19 allow amending and reverting commits when filtering by file 2022-03-27 18:50:29 +11:00
Jesse Duffield 897c4402a4 better colour 2022-03-27 18:16:16 +11:00
Jesse Duffield 860d1e0145 fix copy for merge confirmation 2022-03-27 18:16:16 +11:00
Jesse Duffield e011acbab2 better logging for stash flow 2022-03-27 18:16:16 +11:00
Jesse Duffield 3e5d4b2c74 add menu keybindings for various things 2022-03-27 18:16:16 +11:00
Jesse Duffield e94312b664 use colour 2022-03-27 18:16:16 +11:00
Jesse Duffield 9c226eed37 allow menu to store keybindings for quick menu navigation 2022-03-27 18:16:16 +11:00
Jesse Duffield e43ce23642 require hitting escape to exit menu panel 2022-03-27 18:16:16 +11:00
Jesse Duffield 0dfb7c08b7 remove controllers struct 2022-03-27 18:16:16 +11:00
Jesse Duffield f0a4dcfdc3 refactor menu context 2022-03-27 18:16:16 +11:00
Jesse Duffield 98e7ec0905 add type alias for Key 2022-03-27 18:16:16 +11:00
Jesse Duffield 2b3d457aa4 honour push.default matching config value 2022-03-27 14:58:20 +11:00
Moritz Haase 4abd80e2c4 pkg/gui: Fix crash if auto-fetch interval is non-positive
Check whether the auto-fetch interval configured is actually positive before
starting the background fetcher. If it is not, an error is logged. Also improve
the config option documentation a bit to make it easier to understand how to
disable auto-fetch.
2022-03-27 10:14:33 +11:00
Moritz Haase 240483953f config: Add option 'git.autoRefresh' to en-/disable auto-refresh
Adds a new 'autoRefresh' option to the 'git' config section that allows user to
disable auto-refresh (defaults to on). If auto-refresh is enabled, the
refreshInterval is now checked before starting the timer to prevent crashes when
it is non-positive.

Fixes #1417
2022-03-27 10:14:33 +11:00
Jesse Duffield 51baa8c17d update cheatsheet 2022-03-26 18:00:46 +11:00
Jesse Duffield 102c33433b remove dead code 2022-03-26 18:00:46 +11:00
Jesse Duffield fe87114074 don't hide transient views upon losing focus 2022-03-26 18:00:46 +11:00
Jesse Duffield ad7703df65 show namesake for child views 2022-03-26 18:00:46 +11:00
Jesse Duffield 13b90ac37f support viewing commits of reflog entry and show better view title 2022-03-26 18:00:46 +11:00
Jesse Duffield e039429885 better wording again 2022-03-26 17:22:42 +11:00
Jesse Duffield e0b05f4464 fix cherry picking bug 2022-03-26 17:22:42 +11:00
Jesse Duffield 077b6eb8a3 refactor to make code clearer 2022-03-26 17:22:42 +11:00
Jesse Duffield 45dab51214 add basic commits controller for handling actions that apply to all commit contexts 2022-03-26 17:22:42 +11:00
Luka Markušić 540edb0bf4 Add copy commit attributes option 2022-03-26 17:22:42 +11:00
Jesse Duffield cb26c7a1f2 more things 2022-03-24 20:14:41 +11:00
Jesse Duffield e392b9f86a no more filterThenMap 2022-03-24 20:14:41 +11:00
Jesse Duffield 67a76523fb rename 2022-03-24 20:14:41 +11:00
Jesse Duffield 94a53484a1 would you believe that I'm adding even more generics 2022-03-24 20:14:41 +11:00
Jesse Duffield 1b75ed3740 many more generics 2022-03-24 20:14:41 +11:00
Jesse Duffield bf4f06ab4e more generics 2022-03-24 20:14:41 +11:00
Jesse Duffield eda8f4a5d4 lots more generics 2022-03-24 20:14:41 +11:00
Jesse Duffield c7a629c440 make more use of generics 2022-03-24 20:14:41 +11:00
Jesse Duffield dde30fa104 add gone branches status 2022-03-24 17:50:25 +11:00
Jesse Duffield f113ff21bf add confirmation before performing undo or redo action 2022-03-24 09:45:27 +11:00
Jesse Duffield 12ecd665c8 safe reword 2022-03-23 23:43:21 +11:00
Jesse Duffield cc5d13c833 allow adding whole diff to patch
this was causing a panic

add integration test for toggling all commit files
2022-03-23 23:36:58 +11:00
Jesse Duffield 5ded030a88 diff colour for reflog commits 2022-03-23 18:53:29 +11:00
Jesse Duffield a34bdf1a04 update linters 2022-03-19 12:12:57 +11:00
Jesse Duffield d93fef4c61 use generics to DRY up context code 2022-03-19 12:12:57 +11:00
Jesse Duffield 31ab43d0c5 add host helper 2022-03-17 19:13:40 +11:00
Jesse Duffield fb3752c11f clean up keybindings menu 2022-03-17 19:13:40 +11:00
Jesse Duffield 36c149836a softcode keybinding 2022-03-17 19:13:40 +11:00
Jesse Duffield ea503633aa move keybindings 2022-03-17 19:13:40 +11:00
Jesse Duffield 59d4df2a44 fix click handling 2022-03-17 19:13:40 +11:00
Jesse Duffield cf00949b85 fix integration tests 2022-03-17 19:13:40 +11:00
Jesse Duffield c7b03bd3c2 rename handlers 2022-03-17 19:13:40 +11:00
Jesse Duffield 8fd6338527 move workspace reset menu into controller 2022-03-17 19:13:40 +11:00
Jesse Duffield ee1337b931 add remote branches controller 2022-03-17 19:13:40 +11:00
Jesse Duffield d59c0e2725 remove dead code 2022-03-17 19:13:40 +11:00
Jesse Duffield 675510ba53 fix integration test 2022-03-17 19:13:40 +11:00
Jesse Duffield 4805db7d97 use correct context 2022-03-17 19:13:40 +11:00
Jesse Duffield ef7c4c9ca9 refactor custom commands
more custom command refactoring
2022-03-17 19:13:40 +11:00
Jesse Duffield 952a4f3f23 prevent interrupting confirmation panel 2022-03-17 19:13:40 +11:00
Jesse Duffield 46e9946854 refactor credential handling 2022-03-17 19:13:40 +11:00
Jesse Duffield d0805616e4 move function 2022-03-17 19:13:40 +11:00
Jesse Duffield bff5351ab3 better naming 2022-03-17 19:13:40 +11:00
Jesse Duffield d991d74b06 add commit message controller 2022-03-17 19:13:40 +11:00
Jesse Duffield 120078f011 use PopContext 2022-03-17 19:13:40 +11:00
Jesse Duffield ecaff7fc6c add commit files controller 2022-03-17 19:13:40 +11:00
Jesse Duffield 85f2319897 refactor custom commands panel 2022-03-17 19:13:40 +11:00
Jesse Duffield c685a413c9 stash controller 2022-03-17 19:13:40 +11:00
Jesse Duffield a643957f89 include stash in commitish controller 2022-03-17 19:13:40 +11:00
Jesse Duffield e842d1bc9e move git flow 2022-03-17 19:13:40 +11:00
Jesse Duffield 8a555dd62e refactor 2022-03-17 19:13:40 +11:00
Jesse Duffield bef26b9634 add common commit controller 2022-03-17 19:13:40 +11:00
Jesse Duffield 574c5ca0de add subcommits controller 2022-03-17 19:13:40 +11:00
Jesse Duffield 1253100431 cleanup 2022-03-17 19:13:40 +11:00
Jesse Duffield eab00de273 reflog controller 2022-03-17 19:13:40 +11:00
Jesse Duffield 371b8d638b more consistent naming 2022-03-17 19:13:40 +11:00
Jesse Duffield 55af07a1bb fix CI 2022-03-17 19:13:40 +11:00
Jesse Duffield 33a223e981 remove dead code 2022-03-17 19:13:40 +11:00
Jesse Duffield 943a8e83da ensure we retain state when returning to submodule parent 2022-03-17 19:13:40 +11:00
Jesse Duffield 94d66b267d defend against view not yet having a context defined against it 2022-03-17 19:13:40 +11:00
Jesse Duffield 41527270ed appease linter 2022-03-17 19:13:40 +11:00
Jesse Duffield 3188526ecb fix cheatsheet crash 2022-03-17 19:13:40 +11:00
Jesse Duffield 722410aded refactor controllers 2022-03-17 19:13:40 +11:00
Jesse Duffield b93b8cc00a controller for viewing sub commits 2022-03-17 19:13:40 +11:00
Jesse Duffield cd31a762b9 rename OSCommand field to os 2022-03-17 19:13:40 +11:00
Jesse Duffield d82f175e79 refactor contexts 2022-03-17 19:13:40 +11:00
Jesse Duffield 145c69d9ae working again 2022-03-17 19:13:40 +11:00
Jesse Duffield 482bdc4f1e more refactoring 2022-03-17 19:13:40 +11:00
Jesse Duffield 8e3484d8e9 add global controller 2022-03-17 19:13:40 +11:00
Jesse Duffield 226985bf76 refactor keybindings 2022-03-17 19:13:40 +11:00
Jesse Duffield 2db4636815 no more indirection 2022-03-17 19:13:40 +11:00
Jesse Duffield 2a1e3faa0c resetting controllers on new repo 2022-03-17 19:13:40 +11:00
Jesse Duffield c703cd8f88 fix suggestions panel 2022-03-17 19:13:40 +11:00
Jesse Duffield 0a8cff6ab6 some more refactoring 2022-03-17 19:13:40 +11:00
Jesse Duffield e2f5fe1016 pretty sure we can rely on our views existing before our contexts do 2022-03-17 19:13:40 +11:00
Jesse Duffield 182c999ee0 fix linting 2022-03-17 19:13:40 +11:00
Jesse Duffield b5515da00b move commit files context into new structure 2022-03-17 19:13:40 +11:00
Jesse Duffield c084abb378 move more view model logic into the files view model 2022-03-17 19:13:40 +11:00
Jesse Duffield 8ea7b7a62e migrate files context to new structure 2022-03-17 19:13:40 +11:00
Jesse Duffield 09dc160da9 cleaning up 2022-03-17 19:13:40 +11:00
Jesse Duffield e187293456 moving more into controllers package 2022-03-17 19:13:40 +11:00
Jesse Duffield b04038d08f no need to invoke sync controller here 2022-03-17 19:13:40 +11:00
Jesse Duffield 55b393c929 always fast forward 2022-03-17 19:13:40 +11:00
Jesse Duffield f0c81ea6dc remove redundant popup checks 2022-03-17 19:13:40 +11:00
Jesse Duffield f97de692e3 move helpers into their own struct 2022-03-17 19:13:40 +11:00
Jesse Duffield 2692637fbe standardise naming 2022-03-17 19:13:40 +11:00
Jesse Duffield 77d0732fa8 add actions abstraction 2022-03-17 19:13:40 +11:00
Jesse Duffield 51547e3822 move all refresh code into the one file 2022-03-17 19:13:40 +11:00
Jesse Duffield e363606fb6 move context keys into context package 2022-03-17 19:13:40 +11:00
Jesse Duffield 138be04e65 refactor contexts code 2022-03-17 19:13:40 +11:00
Jesse Duffield 1a74ed3214 avoid deadlock 2022-03-17 19:13:40 +11:00
Jesse Duffield cb0d3a480a use type switch instead of type key 2022-03-17 19:13:40 +11:00
Jesse Duffield a2318d75b5 fix some things 2022-03-17 19:13:40 +11:00
Jesse Duffield 1dd7307fde start moving commit panel handlers into controller
more

and more

move rebase commit refreshing into existing abstraction

and more

and more

WIP

and more

handling clicks

properly fix merge conflicts

update cheatsheet

lots more preparation to start moving things into controllers

WIP

better typing

expand on remotes controller

moving more code into controllers
2022-03-17 19:13:40 +11:00
Jesse Duffield a90b6efded start refactoring gui 2022-03-17 19:13:40 +11:00
Jesse Duffield fa8571e1f4 rename field 2022-03-17 19:01:28 +11:00
David Roman d8d0d4686d Only read env once when recording dirs 2022-03-17 19:01:28 +11:00
David Roman b8fc829f86 Record current directory on switch 2022-03-17 19:01:28 +11:00
Ram Bhosale 7be25a105d allow skipping confirmation prompt after opening subprocess 2022-03-17 17:52:31 +11:00
Francisco Miamoto ca8180e1b7 Use editFileAtLine method for line by line panel 2022-03-16 20:43:53 +11:00
Daniel Kiss f5a5b7f966 Add unstagedChangesColor config option 2022-03-16 19:21:39 +11:00
Matt Cles 9adf4a1908 Add shared function for loading map of custom colors 2022-02-01 18:55:45 +11:00
Matt Cles 4df7646654 Add configurable colors for branch prefixes
Branches can now be colored based on their prefix, if it matches
a user defined prefix in the config file. If no user defined
prefix matches, then it will fallback to the defaults: green for
'feature', yellow for 'bugfix', and red for 'hotfix'. All
remaining branches will be set to the default text color.
2022-02-01 18:55:45 +11:00
Jesse Duffield 1b09674ce8 simplify submodule remove 2022-01-29 00:17:32 +11:00
Jesse Duffield d13a648132 ensure stash panel refreshes 2022-01-28 20:07:30 +11:00
Jesse Duffield 84a1992055 better locking of merge panel state 2022-01-27 21:25:04 +11:00
Jesse Duffield fa2e7ae1e7 show only merge conflict files when there are merge conflicts 2022-01-26 20:28:32 +11:00
Jesse Duffield 5a3f81d1f7 select current bisect commit even if bisect was started on another branch 2022-01-26 19:29:17 +11:00
Jesse Duffield ebbdf829e7 fix panic on rebase 2022-01-26 17:20:58 +11:00
Jesse Duffield 5e9cfab283 better rendering of bisect markets in commits panel 2022-01-26 16:52:20 +11:00
Jesse Duffield ca7cfc3232 only show commits from start ref if bad commit is reachable from there 2022-01-26 16:52:20 +11:00
Jesse Duffield c8cc18920f improve merge conflict flow 2022-01-26 14:50:47 +11:00
glendsoza eb57e3ead0 Fixed the issue with linting 2022-01-26 09:04:12 +11:00
glendsoza 0caa391c4d Changes as per review 2022-01-26 09:04:12 +11:00
glendsoza 0c6bdac2f7 Changes as per review 2022-01-26 09:04:12 +11:00
glendsoza 257e222f8d ISSUE 1706: Ask confirmation before reverting a commit 2022-01-26 09:04:12 +11:00
Jesse Duffield 58bdcbf1dd always refresh after stash action 2022-01-24 19:18:09 +11:00
Jesse Duffield 61ccc1efd2 exclude interactive rebase TODO commits from commit graph 2022-01-22 15:12:24 +11:00
Jesse Duffield 5b7dd9e43c properly resolve cyclic dependency 2022-01-22 10:48:51 +11:00
Jesse Duffield 4ab5e54139 add support for git bisect 2022-01-22 10:48:51 +11:00
Birger Skogeng Pedersen ab84410b41 check returned error (if any) from UpdateWindowTitle 2022-01-21 23:13:39 +11:00
Birger Skogeng Pedersen 62a7d9bbcc invoke title-setting shell command appropriately 2022-01-21 23:13:39 +11:00
Birger Skogeng Pedersen 555d8bbc96 set repo name as window title when loading repo, fix #1691 2022-01-21 23:13:39 +11:00
Jesse Duffield b6fb7f1365 fix integration test 2022-01-18 21:25:52 +11:00
Jesse Duffield d019626342 do not show branch graph when in filtering mode 2022-01-17 22:00:53 +11:00
Jesse Duffield 595aca2a4b make integration test pass 2022-01-17 19:14:59 +11:00
Jesse Duffield 2691477aff allow sandbox mode with integration tests 2022-01-17 19:14:59 +11:00
Jesse Duffield 99035959a1 fix merge scroll bug 2022-01-16 23:16:05 +11:00
Jesse Duffield 0092c9d08d fix bug with subprocess 2022-01-16 03:32:09 +00:00
Jesse Duffield befa35645e fix bug which prevented quitting with confirm 2022-01-15 20:35:25 +11:00
Jesse Duffield 1c84f77319 always specify upstream when pushing/pulling 2022-01-15 15:34:01 +11:00
Jesse Duffield 8d8bdb948b avoid deadlock in merge panel 2022-01-15 14:15:41 +11:00
Jesse Duffield cdcfeb396f stop refreshing the screen so much 2022-01-15 14:15:41 +11:00
Jesse Duffield 8263d15b03 fix issue where custom command would not open a menu 2022-01-15 10:14:19 +11:00
Jesse Duffield 2436ff197a fewer panics 2022-01-09 14:14:47 +11:00
Jesse Duffield e5096e71ab add integration test for discarding old files 2022-01-09 14:14:47 +11:00
Jesse Duffield ceb927fec0 fix formatting 2022-01-09 14:14:47 +11:00
Jesse Duffield 0dfd02c42d allow rewording old commits 2022-01-09 14:14:47 +11:00
Jesse Duffield ee15202207 add newline after message because it looks like the message doesn't appear otherwise for some reason 2022-01-09 14:09:53 +11:00
Jesse Duffield 18f48a43d5 add some more linters 2022-01-09 14:09:53 +11:00
Jesse Duffield fdf79fdeee fix bug that caused credentials popup to be raised unexpectedly 2022-01-09 14:09:53 +11:00
Jesse Duffield 0dd1c12e2f fix format issue 2022-01-09 14:09:53 +11:00
Jesse Duffield 364c5db19c shorten name 2022-01-09 14:09:53 +11:00
Jesse Duffield c9a0cc6b30 refactor 2022-01-09 14:09:53 +11:00
Jesse Duffield 3621854dc7 fix tests 2022-01-09 14:09:53 +11:00
Jesse Duffield ee8ff6512f trim down gitcommand struct some more 2022-01-09 14:09:53 +11:00
Jesse Duffield 610e503296 refactor git flow 2022-01-09 14:09:53 +11:00
Jesse Duffield e92076d2c2 start removing direct calls to cmd.New from gui 2022-01-09 14:09:53 +11:00
Jesse Duffield 3f44eac95b remove repo field 2022-01-09 14:09:53 +11:00
Jesse Duffield 946a35b59d remove OSCommand field 2022-01-09 14:09:53 +11:00
Jesse Duffield f503ff1ecb start breaking up git struct 2022-01-09 14:09:53 +11:00
Jesse Duffield 48a4565d1f remove log of error now that we're returning it normally 2022-01-07 11:01:42 +11:00
Jakob Kogler ee7a6391a8 remove redundant commit 2022-01-07 11:01:42 +11:00
Jakob Kogler 68fc6059d3 rename variable to failedCommitMessage 2022-01-07 11:01:42 +11:00
Jakob Kogler f981255a5b don't ignore error when commit with subprocess fails
If signing by GPG is enabled, the git commit command will be executed in
a subprocess, differently from when it is executed without GPG signing.
In case of an error, e.g. a failing pre-commit hook, the error needs to
be passed along, and not just ignored.
2022-01-07 11:01:42 +11:00
Jakob Kogler beedc2553d remember the message if commit fails
In case a commit fails, e.g. because a pre-commit hook returns an error,
lazygit will now remember the commit message and will suggest it during
the next commit (e.g. after fixing the error of the pre-commit hook).
2022-01-07 11:01:42 +11:00
Jesse Duffield 0d3e5e6a1d simplify fetch 2022-01-07 10:52:51 +11:00
Jesse Duffield 93729ba61b fix some things 2022-01-07 10:52:51 +11:00
Jesse Duffield 91fe68576c refactor 2022-01-07 10:52:51 +11:00
Jesse Duffield 05fa483f48 simplify how we log commands 2022-01-07 10:52:51 +11:00
Jesse Duffield 6da6c1f2f2 small copy changes 2022-01-04 09:07:15 +11:00
Jesse Duffield c82606a92a fix broken format call 2022-01-04 09:07:15 +11:00
Jesse Duffield 194ff1630c do dependency injection up front and in one place 2022-01-04 09:07:15 +11:00
Jesse Duffield 9c4a819683 refactor sync test 2022-01-04 09:07:15 +11:00
Jesse Duffield 547e0153ec stash and tags loaders 2022-01-04 09:07:15 +11:00
Jesse Duffield 44b6d26b10 move remotes loader into loaders package 2022-01-04 09:07:15 +11:00
Jesse Duffield d69ce7a529 move reflog commit loader into loaders package 2022-01-04 09:07:15 +11:00
Jesse Duffield 9b2b0fc122 WIP 2022-01-04 09:07:15 +11:00
Jesse Duffield 96c2887fd0 WIP 2022-01-04 09:07:15 +11:00
Jesse Duffield 66e840bc3f more refactoring 2022-01-04 09:07:15 +11:00
Jesse Duffield b028f37ba8 updating specs 2022-01-04 09:07:15 +11:00
Jesse Duffield 1fc0d786ae better typing for rebase mode 2022-01-04 09:07:15 +11:00
Jesse Duffield 43a4fa970d WIP 2022-01-04 09:07:15 +11:00
Jesse Duffield 192a548c99 refactoring the config struct 2022-01-04 09:07:15 +11:00
Jesse Duffield 01ea5813a8 align Gui struct with GitCommand 2022-01-04 09:07:15 +11:00
Jesse Duffield 18ab086126 introduce Common struct for passing around common stuff 2022-01-04 09:07:15 +11:00
Jesse Duffield b4c078d565 WIP 2022-01-04 09:07:15 +11:00
Jesse Duffield 9ef65574db refactor to rename pull_request to hosting_service and apply SRP 2021-12-29 09:01:06 +11:00
Jesse Duffield f89747451a allow opening a commit in the browser 2021-12-29 09:01:06 +11:00
Francisco Miamoto 8a76b5a4ee use custom handler only for branch commits context 2021-12-28 15:54:19 +11:00
Francisco Miamoto 1a7d0cd7ae add binding to go to bottom on lists
Related to #1584
2021-12-28 15:54:19 +11:00
Francisco Miamoto 8c8b925b3a set tag index directly
We can do this since they are already sorted by date created.
2021-12-26 17:08:31 +11:00
Francisco Miamoto eff6c4283b change formatting for menu items 2021-12-26 17:08:31 +11:00
Francisco Miamoto 7888ff6cb9 set show cancel as true for tag menu 2021-12-26 17:08:31 +11:00
Francisco Miamoto e7a005f44d update translations to match conventions 2021-12-26 17:08:31 +11:00
Francisco Miamoto 3e58797096 show tag menu for creation on tags tab 2021-12-26 17:08:31 +11:00
Francisco Miamoto b1d6ccddfb support creating annotated tags 2021-12-26 17:08:31 +11:00
Marius Bergmann 38743ec99f Suggest existing remote for non-tracking branch
Currently, when pushing or pulling a branch that has no tracking remote,
lazygit suggests the (hard-coded) remote named 'origin'. However, a
repository might not have a remote with this name, in which case the
suggestion makes no sense. This happens to me quite regularly when I
choose a more meaningful name than 'origin' for a remote.

This change keeps the current behavior by suggesting 'origin' when there
is either a remote with that name or no remote at all. However, when
'origin' does not exist, the name of the first remote is suggested.

Suggest existing remote for non-tracking branch

Currently, when pushing or pulling a branch that has no tracking remote,
lazygit suggests the (hard-coded) remote named 'origin'. However, a
repository might not have a remote with this name, in which case the
suggestion makes no sense. This happens to me quite regularly when I
choose a more meaningful name than 'origin' for a remote.

This change keeps the current behavior by suggesting 'origin' when there
is either a remote with that name or no remote at all. However, when
'origin' does not exist, the name of the first existing remote is
suggested.
2021-12-26 15:47:58 +11:00
Mark Sagi-Kazar fdf0d4a2c3 implement signoff
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-12-25 12:01:55 +11:00
Cokile 76e6745526 fix typo 2021-12-25 11:54:27 +11:00
Cokile 3771f9c98b support config unified color for commit authors 2021-12-25 11:54:27 +11:00
Jesse Duffield 18283ad41b add popup handler for easier testing 2021-12-06 22:37:28 +11:00
Jesse Duffield 1996eddd91 more efficient context diff size changing 2021-12-06 22:37:28 +11:00
DerTeta de0e885c65 Refresh staging- or patch building panel when rendering their respective context 2021-12-06 22:37:28 +11:00
DerTeta f7ffbbd72a Add a menu entry and keybinding to { for decreasing the context size 2021-12-06 22:37:28 +11:00
DerTeta 0fbde05928 Add a menu item and keybinding to } to increase the context size 2021-12-06 22:37:28 +11:00
DerTeta ba844c18a5 Add the DecreaseContextInDiffView function 2021-12-06 22:37:28 +11:00
DerTeta e1cf6912db Add the IncreaseContextInDiffView function 2021-12-06 22:37:28 +11:00
DerTeta 3e3151f86a Fix: Don't access a view if it's nil
The way the `if` expression in `deactivateContext` was composed,
it was possible to have it to evaluate to `true` even though the
`view` variable was `nil`.

As far as I can tell, this seems to be only possible during tests.
Nonetheless, I think the expression looks more "correct" this way.
2021-12-06 22:37:28 +11:00
Jesse Duffield 02bf6a5c17 fix delta again 2021-11-22 21:07:04 +11:00
Jesse Duffield 2f45db8f7c fix scrolling in sub commits panel 2021-11-10 08:54:14 +11:00
Jesse Duffield 1d40d03bb2 refactor 2021-11-05 07:58:21 +11:00
Jesse Duffield 9a9e3d506d more consistent rendering 2021-11-05 07:58:21 +11:00
Jesse Duffield 06ca71e955 fix bug 2021-11-05 07:58:21 +11:00
Jesse Duffield ccd80a0e4b add menu options for log stuff 2021-11-05 07:58:21 +11:00
Jesse Duffield 37be9dbea1 support scrolling left and right 2021-11-05 07:58:21 +11:00
Jesse Duffield f6ec7babf5 add some config 2021-11-05 07:58:21 +11:00
Jesse Duffield 802cfb1a04 render commit graph 2021-11-05 07:58:21 +11:00
Jesse Duffield 2fc1498517 some refactoring in anticipation of the graph feature 2021-11-01 10:03:49 +11:00
Jesse Duffield 7a464ae5b7 add graph algorithm 2021-11-01 10:03:49 +11:00
Jesse Duffield 927ee63106 support aborting a merge or rebase with esc 2021-11-01 09:18:30 +11:00
Jesse Duffield c47c539e12 support user-configurable author colours 2021-10-30 18:26:06 +11:00
Jesse Duffield 7561703e8d move author name colouring code into its own file 2021-10-30 18:26:06 +11:00
Jesse Duffield e122f421e6 only use a single initial for double sized runes 2021-10-30 18:26:06 +11:00
Ryooooooga 6171690b00 Fix multibyte initial characters 2021-10-30 18:26:06 +11:00
Jesse Duffield 253504a094 associate random colours with authors 2021-10-30 18:26:06 +11:00
Jesse Duffield f704707d29 stream output from certain git commands in command log panel 2021-10-30 18:26:06 +11:00
Jesse Duffield 01d82749b1 fix commit message prefix thingo 2021-10-25 22:40:15 +00:00
Jesse Duffield 3eb124c732 easier hiding of command log 2021-10-23 12:54:57 +11:00
Jesse Duffield ef544e6ce9 add more suggestions 2021-10-23 12:29:52 +11:00
Jesse Duffield 629494144f show suggestions when typing in an origin 2021-10-23 12:29:52 +11:00
Jesse Duffield b6a5e9d615 use cached git config 2021-10-23 10:26:47 +11:00
Sam Burville 5df0475612 Add variable to simplify JumpToBlock keybinding
This removes the magic '5' and instead uses the number of windows.
2021-10-22 22:38:26 +11:00
Sam Burville f6e316dfe5 Improve JumpToBlock keybinding functionality
Improve experience when yaml file has != 5 keybindings and change view
helper to use the length of the array instead of hardcoded value.
2021-10-22 22:38:26 +11:00
Sam Burville 91e8765d9c Add JumpToBlock keybinding
This should allow users to decide their own keybinding for jumping
between blocks/panels.
E.g. A user could choose 5-9 instead of 1-5.
2021-10-22 22:38:26 +11:00
Jesse Duffield 80a8e9b04d fix merge conflict scrolling 2021-10-22 22:16:52 +11:00
Jesse Duffield 2008c39516 add tests for dealing with remotes 2021-10-22 21:33:17 +11:00
Jesse Duffield 6388af70ac simplify pull logic 2021-10-22 21:33:17 +11:00
Jesse Duffield 5ee559b896 fix issue where upstream origin and branch were quoted together
fix issue where upstream origin and branch were quoted together
2021-10-20 09:29:17 +11:00
Jesse Duffield ca7252ef8e suggest files when picking a path to filter on
async fetching of suggestions

remove limit

cache the trie for future use

more

more
2021-10-19 09:02:42 +11:00
Jesse Duffield a05f22efa2 support home/end keys in editors 2021-10-17 20:14:31 +11:00
Jesse Duffield c0cd9dd835 stop opening suggestions tab when no suggestions present 2021-10-17 20:05:09 +11:00
Jesse Duffield 305f211615 surface error when trying to set upstream 2021-10-17 09:00:08 +00:00
Jesse Duffield d672b7342f stop resetting scroll all the time 2021-10-17 19:45:57 +11:00
Jesse Duffield e7c27b6f4a small fixes 2021-10-17 06:41:21 +00:00
Jesse Duffield 345c90ac05 fix editor 2021-10-17 04:17:59 +00:00
Jesse Duffield 87e9d9bdc2 minor changes 2021-10-16 21:18:43 +11:00
Hrishikesh Hiraskar b6454755ca copy selected text to clipboard 2021-10-16 21:18:43 +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
Sam Burville c5f7ad5adb Make cherry pick commit color customisable
Two new settings in the config, which allow the cherry picked
foreground and background to be custom colors.

Issue #856
2021-09-30 01:26:05 +10:00
Jesse Duffield ab0117c416 fix some encodings 2021-09-27 19:58:24 +10:00
Jesse Duffield 652c97d239 honour options menu press 2021-09-27 19:41:38 +10:00
black_desk 66d0fd2133 Format code to pass lint 2021-09-16 21:38:43 +08:00
Ryooooooga 57f7051590
Fix deletion of unmerged branches in languages other than English 2021-09-04 21:01:38 +09:00
codesoap c1d2aa61f3 Fix misspells 2021-09-01 22:51:24 +02:00
Dwarven YANG 63072af5bc allow user to configure the gui language 2021-08-30 09:12:29 +10:00
Jesse Duffield 44d08edfb0 Address feedback 2021-08-25 22:23:55 +10:00
Jesse Duffield f08fdb2873 Minor refactor 2021-08-25 22:23:55 +10:00
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 a533f8e1a5 simplify merge panel logic 2021-08-25 22:23:55 +10:00
Ryooooooga cf8ded0b79 add mergeConflict#hasAncestor 2021-08-25 22:23:55 +10:00
Ryooooooga 73548fa15f Fix conflict resolution 2021-08-25 22:23:55 +10:00
Ryooooooga a0e7604f61 Support git config merge.conflictStyle diff3 2021-08-25 22:23:55 +10:00
Liberatys 711bd5a670 Lint 2021-08-25 20:13:50 +10:00
Liberatys 6b68f4f25d Update as per review and add tests 2021-08-25 20:13:50 +10:00
Liberatys 89ee0a1dee Move field names to translation 2021-08-25 20:13:50 +10:00
Liberatys 2dc6f5f079 Implement state filtering for commit files 2021-08-25 20:13:50 +10:00
Mark Kopenga 487ad196a7
Merge pull request #1413 from Ryooooooga/feature/edit-line
Make os.editCommand customizable using template
2021-08-23 10:15:38 +02:00
Ryooooooga 0af0e66586
Fix panic in merge conflict 2021-08-21 18:34:30 +09:00
mjarkk e58376f9f7 add tests for TemplateFuncMapAddColors 2021-08-09 21:09:52 +02:00
Elwardi e8e4fa5957 Add color functions to templates funcMaps 2021-08-09 11:52:00 +01:00
Elwardi b5d8849c06 Support match colors in labelFormat entry in menuFromCommand prompts 2021-08-07 16:06:36 +01:00
Mark Kopenga 5d1a9639b6
Merge pull request #1416 from FoamScience/feature_menuOptions 2021-08-07 15:24:42 +02:00
mjarkk ea136e4e77 Improve code quality
- Make CommandMenuEntry private
- create candidates only once we really need it
- Use only 1 buffer
- Clearify CommandMenuEntry creation fields
2021-08-06 21:50:58 +02:00
Elwardi dcd3b7c058 Show only labels in menuFromCommand prompts 2021-08-06 18:38:26 +01:00
Elwardi 906ec30cac Minor changes to menuFromCommand prompts 2021-08-06 10:53:32 +01:00
Matthew Garelli 46c146a8c1 fixed test failing due to ForceSetColorLevel in pkg/gui/style/style_test.go 2021-08-06 02:18:04 -07:00
Elwardi a8ec044f0e Make menuFromCommand format menu items and their description 2021-08-05 15:45:18 +01:00
Ryooooooga ac609bd37c
fix backward compatibility 2021-08-04 18:43:34 +09:00
Ryooooooga 67cc65930a
fix out of range error 2021-08-03 22:00:28 +09:00
Ryooooooga 4f66093335
introduce edit command template to open a specifig line of a file 2021-08-03 21:42:14 +09:00
Jesse Duffield d626bcac00 color fixups 2021-08-01 16:14:56 +10:00
Jesse Duffield e798aa4b15 more color tests 2021-08-01 13:21:06 +10:00
mjarkk 0662733ad9 add tests for color changes 2021-07-31 20:53:49 +02:00
Jesse Duffield 550c0fd4dc refactor 2021-07-31 17:56:47 +10:00
Jesse Duffield 0bc0e4ac88 more efficient 2021-07-31 17:33:20 +10:00
Jesse Duffield 117c0bd4f7 simplify code a bit 2021-07-31 17:33:13 +10:00
mjarkk 79848087bc Switch to github.com/gookit/color for terminal colors 2021-07-30 15:14:46 +02:00
Jesse Duffield 62393cf28a more treeish files 2021-07-27 21:52:42 +10:00
Jesse Duffield b81bac3d65 more i18n 2021-07-27 21:30:08 +10:00
Jesse Duffield 58ddbae4d1 Minor refactor 2021-07-27 21:30:08 +10:00
Denis Palashevskii 3802b563b0 Add error message if target branch not found with prompt 2021-07-27 21:30:08 +10:00
Denis Palashevskii d1134daa53 review fixes: PR URL refactoring, target branch selection prompt 2021-07-27 21:30:08 +10:00
Denis Palashevskii bccf203a18 Fix menu item color 2021-07-27 21:30:08 +10:00
Denis Palashevskii b590397dce Update docs 2021-07-27 21:30:08 +10:00
Denis Palashevskii 0e6598adbd Implement pull request options menu 2021-07-27 21:30:08 +10:00
Mark Kopenga eec20b845d
Merge pull request #1392 from mjarkk/parcally-fix-1385
Change the way file statuses are loaded
2021-07-26 11:22:14 +02:00
mjarkk fc76b44b45 correctly show files with special chars in commit 2021-07-23 12:04:23 +02:00
mjarkk 9a087d04eb Change the way file statuses are loaded
This makes it so file statuses recived from git no longer get joined
before spliting them again.
2021-07-22 22:12:43 +02:00
mjarkk 713fae3e32 format code 2021-07-22 19:45:43 +02:00
Elwardi 148bf2c070 Add test for GenerateMenuCandidates from Custom Commands 2021-07-22 15:44:16 +01:00
Elwardi edfb0a26b2 Refactor code around handleCustomCommandKeybinding 2021-07-20 20:59:03 +01:00
Elwardi f70435a20f Better format error catching in menuFromCommand prompts 2021-07-19 13:41:42 +01:00
Elwardi b92ff3ee3f Consider first match only in menuFromCommand prompt 2021-07-19 13:06:00 +01:00
Elwardi f1ced5539a Add option to format filter matches to menuFromCommand prompts 2021-07-19 11:46:29 +01:00
Elwardi 77e9ee64a4 Apply suggestions from @mjarkk for menyFromCommands 2021-07-18 18:42:42 +01:00
Elwardi 9daa47fb2d Add docs for menuFromCommand prompts 2021-07-18 10:36:01 +01:00
Elwardi d18c8c8dc3 Add prompt type: menuFromCommand 2021-07-18 10:36:00 +01:00
mjarkk fc066d2f2e parse github emoji config option 2021-07-16 14:06:01 +02:00
Davyd McColl 35f1ccdb1b ♻️ temporarily bypass ignore whitespace for diff view instead of turning the toggle off completely 2021-07-01 17:13:14 +10:00
Davyd McColl b80fafef02 🎨 properly ignore the result 2021-07-01 17:13:14 +10:00
Davyd McColl 130480555f always show whitespace in diffs when entering line-by-line staging 2021-07-01 17:13:14 +10:00
Davyd McColl 92cc6e883d 🚚 move whitespace toggle out of quitting.go 2021-07-01 17:13:14 +10:00
Davyd McColl 107503c903 🎨 alternative syntax 2021-07-01 17:13:14 +10:00
Davyd McColl 16dcc8f4db implement feedback when toggling whitespace 2021-07-01 17:13:14 +10:00
Davyd McColl 22a6771e51 🎨 run go fmt against the file directly ftw 2021-07-01 17:13:13 +10:00
Davyd McColl a9f04d3925 facilitate toggling whitespace in the diff view with a hotkey (c-w by default) 2021-07-01 17:13:13 +10:00
Daniel Ebrahimian 0c3132c6f0
Fix typo in random tip 2021-06-28 11:03:54 +10:00
Cristian Betivu 39c8577074 Use static context 2021-06-16 15:00:17 +10:00
Cristian Betivu 0c2d90a444 Add comment 2021-06-16 15:00:17 +10:00
Cristian Betivu 0c135515a5 Use parent view for tab navigation 2021-06-16 15:00:17 +10:00
Emiliano Ruiz Carletti b4e6850f98 Fix wrong ff-only configuration 2021-06-15 08:31:07 +10:00
Emiliano Ruiz Carletti c57a0077d0 Read pull mode from gitconfig lazily 2021-06-15 08:31:07 +10:00
Jesse Duffield ce7cbe58a0 naming change 2021-06-14 18:17:08 +10:00
Andrei Yangabishev 7588d5290b ShowTotal flag 2021-06-10 12:43:05 +03:00
Jesse Duffield 9fdf92b226 more refactoring
WIP

WIP
2021-06-06 09:12:49 +10:00
Jesse Duffield 93bf691fd6 refactoring 2021-06-06 09:12:49 +10:00
Jesse Duffield fb395bca6e support reverting merge commits 2021-06-05 22:15:51 +10:00
Jesse Duffield f91adf026b fix lbl scrolling 2021-06-05 13:54:05 +10:00
Jesse Duffield 6d91661d5e prevent closure issue 2021-06-05 13:54:05 +10:00
Jesse Duffield 90983aae65 not importing regexp 2021-06-05 13:53:25 +10:00
Jesse Duffield f71b23b890 more explicit 2021-06-05 13:53:25 +10:00
Cristian Betivu 05a23f0e1e Discard value after END marker 2021-06-05 13:53:25 +10:00
Cristian Betivu fd38ad8096 More generic merge conflict detection 2021-06-05 13:53:25 +10:00
Jesse Duffield 258eedb38c refactor 2021-06-02 20:33:52 +10:00
Jérémy Pagé bc044c64b2 Remove origin prefix when creating local branch based from origin 2021-05-30 15:29:56 +10:00
Harrison Jones e478c254d4 Handle alternate merge conflict format; add tests 2021-05-30 13:50:42 +10:00
Liberatys 44f7fc6f7c Add global binding to open recent repos 2021-05-30 13:25:44 +10:00
Jesse Duffield a99e6ba071 update release notes 2021-04-20 18:34:47 +10:00
Jesse Duffield 604ee02cd9 ignore east asian width setting to avoid broken frame rendering 2021-04-19 23:06:05 +10:00
Jesse Duffield 926a48a65b smarter sizing of command log panel 2021-04-19 18:09:01 +10:00