summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
4 daysREADME.md: Update Sponsorscreate-pull-request/patchgithub-actions[bot]
4 daysAdd user config gui.commitAuthorFormat (#3625)HEADmasterStefan Haller
- **PR Description** Adds configuration option defining whether to show full author names or their shortened form in the commit graph. Closes [#3624](https://github.com/jesseduffield/lazygit/issues/3624). - **Please check if the PR fulfills these requirements** * [x] Cheatsheets are up-to-date (run `go generate ./...`) * [x] Code has been formatted (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting)) * [ ] Tests have been added/updated (see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) for the integration test guide) * [ ] Text is internationalised (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation)) * [x] Docs have been updated if necessary * [x] You've read through your own file changes for silly mistakes etc
5 daysAdd user config gui.commitAuthorFormatanikiforov
6 daysFix reporting of unexpected selections in integration tests (#3662)Stefan Haller
Expected and actual selection were swapped in the error message.
6 daysFix reporting of unexpected selections in integration testsStefan Haller
Expected and actual selection were swapped in the error message.
8 daysShow "exec" todos in the list of rebase todos (#3654)Stefan Haller
- **PR Description** It is sometimes useful to perform a `git rebase -x "make test" origin/main` in order to verify that all commits of the current branch are green. However, if the rebase stops in the middle because one of those tests fail, it's easy to accidentally press `m <enter>` in lazygit after amending some fix, not realizing that the rest of the tests will now run invisibly inside lazygit. This PR makes two changes to improve this situation: - It shows exec todos in the commits panel: <img width="482" alt="image" src="https://github.com/jesseduffield/lazygit/assets/1225667/608b24e8-9f3d-4a5f-9bb5-e16268c86e83"> - when continuing a rebase and there are exec todos, it suspends itself to the background so that you can see the output of the test runs in the terminal. We can improve this further in the future; for example, it would often be useful to be able to delete some of the exec commands, this is not currently possible. But it's still better than before.
8 daysSuspend lazygit when continuing a rebase with exec todosStefan Haller
It's likely that the exec todos are some kind of lengthy build task whose output the user will want to see in the terminal.
8 daysShow "exec" todos in the list of rebase todosStefan Haller
Unfortunately it isn't possible to delete them. This would often be useful, but our todo rewriting mechanisms rely on being able to find todos by some identifier (hash for pick, ref for update-ref), and exec todos don't have a unique identifier.
10 daysImprove "Find base commit for fixup" command when there are changes for ↵Stefan Haller
master commits (#3645) - **PR Description** If exactly one candidate from inside the current branch is found, we return that one even if there are also hunks belonging to master commits; we disregard those in this case. - **Please check if the PR fulfills these requirements** * [x] Cheatsheets are up-to-date (run `go generate ./...`) * [x] Code has been formatted (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting)) * [x] Tests have been added/updated (see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) for the integration test guide) * [ ] Text is internationalised (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation)) * [ ] Docs have been updated if necessary * [x] You've read through your own file changes for silly mistakes etc
10 daysDisregard master commits when finding base commit for fixupStefan Haller
If exactly one candidate from inside the current branch is found, we return that one even if there are also hunks belonging to master commits; we disregard those in this case.
10 daysDon't reference Model().Commits multiple timesStefan Haller
Copy the slice into a variable and use that throughout the whole operation; this makes us a little more robust against the model refreshing concurrently.
10 daysAdd test demonstrating the desired behaviorStefan Haller
It has two modified hunks, one for a master commit and one for a branch commit. Currently we get an error mentioning those two commits, but we would like to silently select the branch commit.
12 daysSupport range select for amending commit attributes (#3587)Stefan Haller
- **PR Description** This PR makes it possible for users to select a range of commits from the commits view to amend their attributes (set/reset author, add co-author), the same way it's already possible to do for a single commit. It closes #3273. - **Please check if the PR fulfills these requirements** * [x] Cheatsheets are up-to-date (run `go generate ./...`) * [x] Code has been formatted (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting)) * [x] Tests have been added/updated (see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) for the integration test guide) * [ ] Text is internationalised (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation)) * [ ] Docs have been updated if necessary * [x] You've read through your own file changes for silly mistakes etc
12 daysfeat: support range selection for commit attributes amendAzraelSec
12 daysFix secondary window resize (#3637)Stefan Haller
- **PR Description** This PR fixes the behavior the staging secondary panel (staged lines) currently has in relation to changing its view mode. In particular, these changes allows the users to expand the secondary panels the same way all the others do. This closes #3629. - **Please check if the PR fulfills these requirements** * [x] Cheatsheets are up-to-date (run `go generate ./...`) * [x] Code has been formatted (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting)) * [x] Tests have been added/updated (see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) for the integration test guide) * [ ] Text is internationalised (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation)) * [ ] Docs have been updated if necessary * [x] You've read through your own file changes for silly mistakes etc
12 daysfeat: let the staging secondary panel change view modeAzraelSec
12 daysfix: typo in `IsVisible` assertion stringAzraelSec
2024-06-05Include demos when running integration tests on CI (#3640)Stefan Haller
- **PR Description** This includes the demos when using `make integration-test-all`, and speeds them up a little bit when run in this way by disabling Wait calls when running in headless mode. This will guard against demos breaking when we make behavior changes, as happened several times in the past (most recently in #3636.
2024-06-05Include demos when running integration tests with go testStefan Haller
2024-06-05Don't wait in integration tests when running in headless modeStefan Haller
There's no point in spending time waiting in this case, as nobody can see it.
2024-06-05Update `rebase_onto` demo test to match new the rebase menu title (#3636)Stefan Haller
- **PR Description** This PR updates the `rebase_onto` demo integration test, which is currently failing on master due to [this change](https://github.com/jesseduffield/lazygit/pull/3615/files#diff-3eb5426752dae525c92f1ecce2f7215d15bfdec91bd459e08f78574876583910R1259). Our CI does not throw the issue, but it's still annoying to cope with it for local development. @jesseduffield @stefanhaller, I'm unaware of a particular workflow for updating demo tests, but let me know if this needs some tweaks. - **Please check if the PR fulfills these requirements** * [ ] Cheatsheets are up-to-date (run `go generate ./...`) * [ ] Code has been formatted (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting)) * [ ] Tests have been added/updated (see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) for the integration test guide) * [ ] Text is internationalised (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation)) * [ ] Docs have been updated if necessary * [ ] You've read through your own file changes for silly mistakes etc <!-- Be sure to name your PR with an imperative e.g. 'Add worktrees view' see https://github.com/jesseduffield/lazygit/releases/tag/v0.40.0 for examples -->
2024-06-05fix: update rebase_onto demo test to match new rebase menu titleAzraelSec
2024-06-04Make profiling easier (#3634)Stefan Haller
Add a `-profile` command line flag, and some documentation about how to collect and view profile data.
2024-06-04Add some developer documentation about profilingStefan Haller
2024-06-03Add -profile command line flagStefan Haller
When on, start a built-in web server that takes requests on port 6060 to gather profiling data.
2024-06-03Add command to rebase onto base branch (#3615)Stefan Haller
- **PR Description** In the rebase menu, add a command "Rebase onto base branch". This makes it more convenient to rebase onto master (or main), because - you don't need to bring your local version of the base branch up to date first - you don't have to remember which of your main branches (e.g. "main", "devel", or "1.0-hotfixes") your current branch is based on. This is sitting on top of #3614. Closes #3546. - **Please check if the PR fulfills these requirements** * [x] Cheatsheets are up-to-date (run `go generate ./...`) * [x] Code has been formatted (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting)) * [x] Tests have been added/updated (see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) for the integration test guide) * [x] Text is internationalised (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation)) * [x] Docs have been updated if necessary * [x] You've read through your own file changes for silly mistakes etc
2024-06-03Add command "Rebase onto base branch" to rebase menuStefan Haller
2024-06-03Remove target branch from title of rebase menuStefan Haller
Put it into the individual menu items instead. Again, this is necessary because we are going to add another entry to the menu that is independent of the selected branch.
2024-06-03Always show rebase menu, even when rebasing is not possibleStefan Haller
Instead, disable the individual entries in the menu. This is necessary because we are going to add another entry to the menu that is independent of the selected branch.
2024-06-03Make "Rebase" show up with "..." in the keybindings menuStefan Haller
2024-06-03Fix typoStefan Haller
2024-06-03Add command to show divergence from base branch as a left-right log (#3614)Stefan Haller
- **PR Description** Add a command similar to the existing "Show divergence from upstream", but for the base branch instead. Useful to see what you would rebase onto if you were to rebase onto the base branch now. It could be considered somewhat questionable that we display both the Remote and Local sections of the log here; the Local section isn't really interesting because it's always identical to what you see in the Commits view. I chose to still show it since it makes the divergence view look more familiar, and I think overall it makes it clearer what you're looking at. This is sitting on top of #3613 and uses some of the code that was added there. - **Please check if the PR fulfills these requirements** * [x] Cheatsheets are up-to-date (run `go generate ./...`) * [x] Code has been formatted (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting)) * [x] Tests have been added/updated (see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) for the integration test guide) * [x] Text is internationalised (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation)) * [x] Docs have been updated if necessary * [x] You've read through your own file changes for silly mistakes etc
2024-06-03Add command "View divergence from base branch"Stefan Haller
2024-06-03Divergence from base branch display (#3613)Stefan Haller
- **PR Description** Add a new config option `showDivergenceFromBaseBranch`; if not "none", it indicates in the branches view for each branch if it has fallen behind its base branch, and optionally by how much. If set to "onlyArrow", it will append `↓` after the branch status; if set to "arrowAndNumber", it appends `↓17`, where the count indicates how many commits it is behind the base branch. These are colored in blue, and go after the existing yellow `↓3↑7` indication of divergence from the upstream. The option is off by default, since we are afraid that people may find this too noisy. We may reconsider this choice in the future if the response is positive. - **Please check if the PR fulfills these requirements** * [x] Cheatsheets are up-to-date (run `go generate ./...`) * [x] Code has been formatted (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting)) * [x] Tests have been added/updated (see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) for the integration test guide) * [x] Text is internationalised (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation)) * [x] Docs have been updated if necessary * [x] You've read through your own file changes for silly mistakes etc
2024-06-03Show divergence from base branch in branches listStefan Haller
2024-06-03Remove ColoredBranchStatus and branchStatusColorStefan Haller
Previously the entire status was colored in a single color, so the API made sense. This is going to change in the next commit, so now we must include the color in the string returned from BranchStatus(), which means that callers who need to do hit detection or measure the length need to decolorize it. While we're at it, switch the order of ↑3↓7 to ↓7↑3. For some reason that I can't really explain I find it more logical this way. The software out there is pretty undecided about it, it seems: VS Code puts ↓7 first, and so does the shell prompt that comes with git; git status and git branch -v put "ahead" first though. Shrug.
2024-06-03Add GetBaseBranch functionStefan Haller
2024-06-03Make GetMergeBase a method of ExistingMainBranchesStefan Haller
2024-06-03Factor out CommitLoader.mainBranches into its own class, and store it in ModelStefan Haller
2024-06-03Remove the cache invalidation logic from getMergeBaseStefan Haller
It is a valid case for a branch to share no history with any of the main branches, in which case git merge-base returns an error (and an empty string). Since we can't distinguish this from one of the main branches having been deleted, we shouldn't invalidate the cache in that case.
2024-06-03More explicit test of status panel contentStefan Haller
Use Equals instead of Contains for asserting the status view content. This solves the problem that we might assert Contains("↓2 repo"), but what it really shows is "↑1↓2 repo", and the test still succeeds. At best this is confusing. Also, this way we don't have to use the awkward DoesNotContain to check that it really doesn't show a checkmark. To do this, we need to fix two whitespace problems: - there was always a space at the end for no reason. Simply remove it. It was added in efb51eee96, but from looking at that diff it seems it was added accidentally. - there was a space at the beginning if the branch status was empty. This is actually a cosmetic problem, for branches without a status the text was indented by once space. Change this so that the space is added conditionally. It's a bit awkward that we have to use Decolorise here, but this will go away again later in this branch.
2024-06-02(#3618) Fix pushing a branch to remote with a different name causing error ↵Stefan Haller
(#3630) - **PR Description** This fixes an error where, given the user wants push a branch to a remote branch with a different name, the following error would be presented: ``` Error error: src refspec <desired remote branch name> does not match any error: failed to push some refs to <remote .git URI> ``` - **Please check if the PR fulfills these requirements** * [x] Cheatsheets are up-to-date (run `go generate ./...`) * [x] Code has been formatted (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting)) * [x] Tests have been added/updated (see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) for the integration test guide) * [x] Text is internationalised (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation)) * [x] Docs have been updated if necessary * [x] You've read through your own file changes for silly mistakes etc
2024-06-02Add HEAD: when referencing upstream branchJordan
Update unit tests
2024-06-01Improve the "Find base commit for fixup" command (#3602)Stefan Haller
- **PR Description** Improve the `ctrl-f` command so that it also works when there are no hunks with deleted lines in the diff. This is very useful, for example, when a fixup commit adds a comment to a function that was added in the PR. Since the exact behavior of the command is getting very complex and hard to understand, I added a design document that describes what it does, and also how it differs from git-absorb which does a very similar thing. - **Please check if the PR fulfills these requirements** * [x] Cheatsheets are up-to-date (run `go generate ./...`) * [x] Code has been formatted (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting)) * [x] Tests have been added/updated (see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) for the integration test guide) * [x] Text is internationalised (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation)) * [x] Docs have been updated if necessary * [x] You've read through your own file changes for silly mistakes etc
2024-06-01Update user docStefan Haller
2024-06-01Add design document for "Find base commit for fixup"Stefan Haller
This document explains why we made certain decisions about the behavior of the command. This is too detailed for users, but could be useful in the future if we want to discuss further improvements.
2024-06-01Make "Find base commit for fixup" work with hunks with only added linesStefan Haller
To understand what this does and why, read the design document that I'm about to add in the next commit.
2024-06-01Extract a function findCommitStefan Haller
It's not much code, but it turns three lines of code into one, and since we need to do this a few more times in the next commit, it's worth it.
2024-06-01Return errors from blameDeletedLines instead of just logging themStefan Haller
I guess when I originally wrote this code I just didn't know how to do that...
2024-06-01Also return hunks with only added lines from parseDiffStefan Haller
We aren't using them, yet, except for deciding whether to show the warning about hunks with only added lines. Add a bit of test coverage for parseDiff while we're at it.