summaryrefslogtreecommitdiffstats
path: root/pkg
AgeCommit message (Collapse)Author
2023-08-07Use nerdfont version 3Jesse Duffield
Turns out I was on version 2 when recording these. I've switched to v3 now.
2023-08-07update worktree icons for NerdFont V3 (#2895)keybinding-menu-headingsStefan Haller
2023-08-07👽️ update worktree icons for NerdFont V3Saafo
2023-08-06Bump gocuiStefan Haller
... and import stefanhaller's tcell fork for real rather than just replacing it This solves the problem that people trying to "go install github.com/jesseduffield/lazygit@latest" would get the error go: github.com/jesseduffield/lazygit@latest (in github.com/jesseduffield/lazygit@v0.40.0): The go.mod file for the module providing named packages contains one or more replace directives. It must not contain directives that would cause it to be interpreted differently than if it were the main module.
2023-08-05Fix confirmation view sizingJesse Duffield
The proper fix is to actually have these two functions share code, or for views to be able to manage their own heights based on their contents. But I want to get this out for the sake of a Lazygit Anniversary release.
2023-08-04Add custom patch demoJesse Duffield
2023-08-04Add worktree demoJesse Duffield
2023-08-04Add custom command demoJesse Duffield
2023-08-03Add undo/redo demoJesse Duffield
2023-08-02Add demo for staging linesJesse Duffield
2023-08-02Add demo for amending old commitJesse Duffield
2023-08-02Add demo for filtering branchesJesse Duffield
2023-08-02Remove file watcher codeJesse Duffield
Now that we refresh upon focus, we can scrap this file watching code. Stefan says few git UIs use file watching, and I understand why: the reason this code was problematic in the first place is that watching files is expensive and if you have too many open file handles that can cause problems. Importantly: this code that's being removed was _already_ dead.
2023-08-02Refresh when the terminal window gets the focusStefan Haller
2023-08-02Appease linterJesse Duffield
2023-08-02Fix focus issueJesse Duffield
When opening lazygit with `lazygit log` the worktrees view was appearing in front of the files view. This is because it had higher precedence than the files view in the ordered view mapping, and that was because it originally was in the branches window so it was further down the list. The reason this didn't cause issues on typical startup is that the files context is activated at the start so it is brought to the front.
2023-08-01Wait in demo after setting captionJesse Duffield
This looks nicer than waiting a second and then showing the caption as the action begins
2023-08-01Add explosion animation when nuking working treeJesse Duffield
I've been thinking about this for a while: I think it looks really cool if nuking your working tree actually results in a nuke animation. So I've added an opt-out config for it
2023-08-01Start in fullscreen when passing a git argJesse Duffield
Often we just want to see the desired view in fullscreen so I'm making that the default
2023-08-01Internationalise logging of commands (#2852)Jesse Duffield
2023-07-31Adds EditRebaseFromBaseCommit log message to i18nKarl Heitmann
2023-07-31Wraps rebase func with WithWaitingStatus to show loader when rebasingKarl Heitmann
2023-07-31Moves log related translations into its own Tr.Log. namespaceKarl Heitmann
2023-07-31Moves hard coded strings for LogCommand to i18n.Karl Heitmann
2023-07-31Add automated demo recordings (#2853)Jesse Duffield
2023-07-31Add demo test variantJesse Duffield
We're piggybacking on our existing integration test framework to record demos that we can include in our docs
2023-07-31Log error when saving app state fails after showing/hiding command logStefan Haller
2023-07-31Move IgnoreWhitespaceInDiffView to AppState, and persist it when it changesStefan Haller
2023-07-31Show correct keybindings in force-push promptStefan Haller
2023-07-31Allow force-tagging if tag existsStefan Haller
2023-07-31Add a "Mark commit as base commit for rebase" commandStefan Haller
This allows to do the equivalent of "git rebase --onto <target> <base>", by first marking the <base> commit with the new command, and then selecting the target branch and invoking the usual rebase command there.
2023-07-31Cleanup: remove extra OutsideFilterMode guardStefan Haller
We are in the outsideFilterModeBindings section here; all of these handlers are wrapped in a OutsideFilterMode guard in a loop below. No need to add one manually here.
2023-07-31Don't show branch marker for head commit unless updateRefs config is onStefan Haller
2023-07-31Don't show branch heads in reflog subcommitsStefan Haller
It's tricky to get this right for reflog commits wrt what's the current branch for each one; so just disable it entirely here, it's probably not something anybody needs here.
2023-07-31Visualize local branch heads in commits panelStefan Haller
We want to mark all local branch heads with a "*" in the local commits panel, to make it easier to see how branches are stacked onto each other. In order to not confuse users with "*" markers that they don't understand, do this only for the case where users actually use stacked branches; those users are likely not going to be confused by the display. This means we want to filter out a few branch heads that shouldn't get the marker: the current branch, any main branch, and any old branch that has been merged to master already.
2023-07-31Store full sha in branch modelStefan Haller
The model will be used for logic, so the full hash is needed there; a shortened hash of 8 characters might be too short to be unique in very large repos. If some view wants to display a shortened hash, it should truncate it at presentation time.
2023-07-31Add CheckedOutBranch to Model structStefan Haller
2023-07-31Make bisect/basic.go test more concreteStefan Haller
- check out a non-main branch before we start - add authors to expected commits so that we can see whether the commits show an asterisk - explicitly check what the top line displays after bisecting has started This shows that the detached head shows an asterisk, which we don't want. We'll fix that in the next commit.
2023-07-31Add author short names to commits in testStefan Haller
This allow us to check not only whether a given commit has the branch head marker, but also that other commits _don't_ have it, which is important.
2023-07-31Improve updateRef testStefan Haller
This test not only tests the correct handling and display of the updateRef command, but also the visualization of branch heads in the commits panel. Since we are about to change the behavior here, extend the test so that a master commit is added (we don't want this to be visualized as a branch head), and then a stack of two non-main branches. At the end of this branch we only want to visualize the head commit of the first.
2023-07-31Remove the old experimentalShowBranchHeads mechanism and configStefan Haller
We are going to replace it with a better one later in this branch.
2023-07-31Fix merge status of commits when update-ref command is presentStefan Haller
Update-ref commands have an empty sha, and strings.HasPrefix returns true when called with an empty second argument, so whenever an update-ref command is present in a rebase, all commits from there on down were drawn with a green sha.
2023-07-31Add tests for setCommitMergedStatusesStefan Haller
The test for update-ref shows demonstrates a problem. See next commit for the fix.
2023-07-31Make setCommitMergedStatuses a non-member functionStefan Haller
It doesn't depend on anything in CommitLoader, so it can be free-standing, and that makes it easier to test (see next commit).
2023-07-30Remove secureexec packageJesse Duffield
From the go 1.19 release notes: Command and LookPath no longer allow results from a PATH search to be found relative to the current directory. This removes a common source of security problems but may also break existing programs that depend on using, say, exec.Command("prog") to run a binary named prog (or, on Windows, prog.exe) in the current directory. See the os/exec package documentation for information about how best to update such programs.
2023-07-30Standardise on using lo for slice functionsJesse Duffield
We've been sometimes using lo and sometimes using my slices package, and we need to pick one for consistency. Lo is more extensive and better maintained so we're going with that. My slices package was a superset of go's own slices package so in some places I've just used the official one (the methods were just wrappers anyway). I've also moved the remaining methods into the utils package.
2023-07-30Use double dash for disambuating path in editor templatesJesse Duffield
2023-07-30Fix flakey worktree testsJesse Duffield
In the presentation layer, when showing branches, we'll show worktrees against branches if they're associated. But there was a race condition: if the worktree model was refreshed after the branches model, it wouldn't be used in the presentation layer when it came time to render the branches. A better solution would be to have some way of signalling that a particular context needs to be refreshed and after all the models are done being refreshed, we then refresh the contexts. This will prevent double-renders
2023-07-30rename filesJesse Duffield
2023-07-30Write unit tests with the help of aferoJesse Duffield
Afero is a package that lets you mock out a filesystem with an in-memory filesystem. It allows us to easily create the files required for a given test without worrying about a cleanup step or different tests tripping on eachother when run in parallel. Later on I'll standardise on using afero over the vanilla os package