summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2023-07-03Differentiate between different filter modesJesse Duffield
We can filter by path, by file status, and by text.
2023-07-03Update cheatsheetsJesse Duffield
2023-07-03Use searching, not filtering, in file tree viewsJesse Duffield
There's more work to be done to support filtering for these views so we're sticking with searching for now
2023-07-03Fix escape logic for remote branchesJesse Duffield
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-03Add integration tests for searching/filteringJesse Duffield
2023-07-03Support case sensitive filteringJesse Duffield
2023-07-03Color view frame differently when searching/filteringJesse Duffield
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-03Show filter status similar to what we show with searchJesse Duffield
2023-07-03Only cancel search if main or temporary context loses focusJesse Duffield
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-03Scroll to top when filtering and retain selection when cancelling filterJesse Duffield
2023-07-03Move more logic into search helperJesse Duffield
2023-07-03Case insensitive string comparisonJesse Duffield
2023-07-03Support filtering filesJesse Duffield
2023-07-03Cancel filter/search when hitting escapeJesse Duffield
2023-07-03Introduce filtered list view modelJesse Duffield
We're going to start supporting filtering of list views
2023-07-03Add integration tests for discarding filesJesse Duffield
2023-07-02Print entire panic messageJesse Duffield
For some reason, the panic message was being truncated. So here we're printing it first, and then calling panic
2023-07-02Bump gocuiJesse Duffield
2023-06-29Merge pull request #2748 from jesseduffield/always-show-branch-heads-in-diffStefan Haller
Always show branch heads in diff pane
2023-06-29Updated README.mdREADME-bot
2023-06-29Merge pull request #2750 from letavocado/fix-typo-EnteRefNameJesse Duffield
2023-06-28fix: typo EnteRefNameAmirzhan Aliyev
2023-06-28Always show branch heads in diff paneStefan Haller
The first line of the diff pane would show branch heads (e.g. commit dd9100ccc8b69a8b14b21a84e34854b5acfb871a (mybranch, origin/mybranch) only when a pager is used. The reason is that the default of the --decorate option to git show is "auto", which means to show the decoration only when output goes to a tty. Lazygit uses a pty only when a pager is used, so the decoration wouldn't show when no pager is used. Since the branch head annotation is useful and we always want to see it, force it by explicitly passing --decorate.
2023-06-28Merge pull request #2729 from translation-gang/translation-ruJesse Duffield
2023-06-28feat(i18n): add russian translationAmirzhan Aliyev
2023-06-26Merge pull request #2725 from ↵Stefan Haller
stefanhaller/improve-pushed-coloring-for-main-branches Use remote upstreams of main branches to determine merged status of commits
2023-06-26Use remote upstreams of main branches to determine merged status of commitsStefan Haller
This solves three problems: 1. When the local main branch is behind its upstream, the merged status of commits of a feature branch sitting on origin/main was not correct. This can easily happen when you rebase a branch onto origin/main instead of main, and don't bother keeping local main up to date. 2. It works when you don't have the main branch locally at all. This could happen when you check out a colleague's feature branch that goes off of "develop", but you don't have "develop" locally yourself because you normally only work on "main". 3. It also works when you work on a main branch itself, e.g. by committing to it directly, or by merging a branch locally. These local commits on a main branch would previously be shown in green instead of red; this broke with 910a61dc46.
2023-06-26Merge pull request #2706 from stefanhaller/fix-discard-change-promptStefan Haller
Fix the title and text of the Discard Changes prompt
2023-06-26Rename the gui.skipUnstageLineWarning conf key to gui.skipDiscardChangeWarningStefan Haller
2023-06-26Rename "Delete change" menu entry to "Discard change" in staging panelStefan Haller
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-26Fix the title and text (and variable names) of the Discard Changes promptStefan Haller
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-26Merge pull request #2718 from stefanhaller/improve-yaml-utilsStefan Haller
Improve yaml_utils
2023-06-26Avoid rewriting the file if nothing changedStefan Haller
This avoids changing the indentation or number of blank lines etc unnecessarily if nothing has changed.
2023-06-26Add new function RenameYamlKeyStefan Haller
2023-06-26Extract a lookupKey function that will be useful in the next commitStefan Haller
2023-06-26Create missing path elementsStefan Haller
This fixes a serious error: trying to change a value on gui.someOption would add a someOption key at root if gui doesn't exist.
2023-06-26Return an error if some node in the path is not a dictionaryStefan Haller
2023-06-26Return an error if node to be updated is not a scalarStefan Haller
2023-06-26Return an error if document is not a dictionaryStefan Haller
2023-06-26Support updating values in empty documentsStefan Haller
2023-06-26Rename UpdateYaml to UpdateYamlValueStefan Haller
We are going to add other ways to update yaml documents in the future.
2023-06-26Cleanup: improve test setup and check for the right error stringStefan Haller
Use the assert package to check expectations; also, check for the exact error message instead of just whether any error occurred.
2023-06-26Cleanup: remove unnecessary if statementsStefan Haller
The assert package is already very good at displaying errors, including printing a diff of expected and actual value, so there's no point in printing the same information again ourselves.
2023-06-22Merge pull request #2682 from stefanhaller/show-entry-for-conflicted-commitStefan Haller
Show rebase todo entry for conflicted commit
2023-06-22Add a test for stopping at an "edit" command that conflictsStefan Haller
This test is almost identical to swap_in_rebase_with_conflict.go, except that it sets the commit that will conflict to "edit". This test is interesting because there's special code needed to determine whether an "edit" command conflicted or not, i.e. whether to show the "confl" entry. In this case we do. We have lots of other tests already that have "edit" commands that don't conflict, so that's covered already.
2023-06-22Insert fake todo entry for a conflicting commit that is being appliedStefan Haller
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-22Add test for rewording a commit and failing with an errorStefan Haller
The point of this test is to verify that the <--- YOU ARE HERE --- display is correct when the last command in a rebase was "reword".
2023-06-22Add test for a pick that fails and gets rescheduledStefan Haller
This test is interesting because it already behaves as desired: since git has rescheduled the "pick" command, we do _not_ want to show a "conflict" entry in this case, as we would see the same commit twice then.
2023-06-22Add test for amending a commit, causing a conflictStefan Haller
2023-06-22Extend test to expect what commits we want to be listed when there's a conflictStefan Haller