1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-27 00:51:18 +02:00
Commit Graph

185 Commits

Author SHA1 Message Date
ea93df571d feat: add a menu to rebase current branch to a target branch upstream 2023-09-24 20:13:59 +02:00
4c5e250ed8 Add integration test for deleting a remote branch with credentials prompt
This test is interesting because it shows a credentials prompt inside a
WithWaitingStatus. Prior to this branch this test would have hung forever.
2023-09-20 13:29:30 +02:00
276438b601 Add history for search view (#2877) 2023-09-20 16:09:53 +10:00
edec116ceb Add search history
Add search history for filterable and searchable views.
2023-09-20 08:35:41 +03:00
a642395e9f Allow cherry-picking commits during a rebase
This can be useful when you know that a cherry-picked commit would conflict at
the tip of your branch, but doesn't at the beginning of the branch (or
somewhere in the middle). In that case you want to be able to edit the commit
before where you want to insert the cherry-picked commits, and then paste to
insert them into the todo list at that point.
2023-09-18 10:50:19 +02:00
4d258bd981 Use UpstreamBranch for opening pull requests 2023-09-18 13:40:52 +10:00
db409fa69f Add coauthor (#2)
Add co-author to commits

Add addCoAuthor command for commits

- Implement the `addCoAuthor` command to add co-authors to commits.
- Utilize suggestions helpers to populate author names from the suggestions list.
- Added command to gui at `LocalCommitsController`.

This commit introduces the `addCoAuthor` command, which allows users to easily add co-authors to their commits. The co-author names are populated from the suggestions list, minimizing the chances of user input errors. The co-authors are added using the Co-authored-by metadata format recognized by GitHub and GitLab.
2023-09-09 07:18:47 -05:00
7f9fa64074 Replace whitespace with '-' when renaming a branch (#2990) 2023-09-09 17:34:57 +10:00
2b7b6f71ee feat: add a menu to reset current branch to a target branch upstream 2023-09-06 08:40:07 +02:00
c3ca77d6bf Replace whitespace with '-' when renaming a branch 2023-09-05 14:57:18 +01:00
de4224bbe4 Fix escape not cancelling filter mode, but closing the menu instead
When filtering is on in a menu, pressing esc should only cancel the filter, but
not close the menu.
2023-08-30 22:37:13 +02:00
df38e954f4 Add integration test for the new divergence log 2023-08-29 08:16:40 +02:00
91ec42f3f8 Add integration test 2023-08-21 10:03:34 +02:00
83d642b74f Add demo for diffing two commits 2023-08-12 17:24:05 +10:00
8dd517870d Add commit graph demo 2023-08-12 16:16:03 +10:00
f1753f36c8 Add rebase from marked base commit test
This also fixes a bug where after the rebase each commit in the commits view had a tick against it because we hadn't
refreshed the view since the base commit was no longer marked
2023-08-12 16:16:03 +10:00
54776052a1 If OpenLink errors, show a dialog instead
If the command used by OSCommand.OpenLink fails, lazygit crashes. With this change, if the OpenLink command fails, lazygit just shows a dialog inviting the user to visit the relevant URL.

Fixes #2882
2023-08-09 13:12:40 +01:00
0551f29de9 Test bare repos with dotfile setup 2023-08-07 22:21:23 +10:00
f6af4c29d4 Add custom patch demo 2023-08-04 09:15:07 +10:00
996ad5bf26 Add worktree demo 2023-08-04 09:14:58 +10:00
096628e366 Add custom command demo 2023-08-04 08:38:15 +10:00
b432fb5efe Add undo/redo demo 2023-08-03 21:02:12 +10:00
0152639ef0 Add demo for staging lines 2023-08-02 22:32:57 +10:00
c43195efb6 Add demo for amending old commit 2023-08-02 22:32:51 +10:00
17db918cba Add demo for filtering branches 2023-08-02 22:32:51 +10:00
a200fccba9 Add explosion animation when nuking working tree
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-01 22:16:04 +10:00
b92c294059 Add automated demo recordings (#2853) 2023-07-31 22:43:36 +10:00
9cc1d65280 Add demo test variant
We're piggybacking on our existing integration test framework to record  demos that we can include in our docs
2023-07-31 22:33:04 +10:00
d41a195ee6 Allow force-tagging if tag exists 2023-07-31 11:38:52 +02:00
66de981e91 Add a "Mark commit as base commit for rebase" command
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-31 08:41:41 +02:00
f5c9764dd2 Don't show branch heads in reflog subcommits
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-31 08:34:01 +02:00
9c57444adc Remove the old experimentalShowBranchHeads mechanism and config
We are going to replace it with a better one later in this branch.
2023-07-31 08:34:00 +02:00
4c5b1574f1 Centralise logic for obtaining repo paths
There are quite a few paths you might want to get e.g. the repo's path, the worktree's path,
the repo's git dir path, the worktree's git dir path. I want these all obtained once and
then used when needed rather than having to have IO whenever we need them. This is not so
much about reducing time spent on IO as it is about not having to care about errors every time
we want a path.
2023-07-30 18:35:24 +10:00
2b24c15938 Add test for opening lazygit in the worktree of a bare repo 2023-07-30 18:35:23 +10:00
ae66f720f5 Update repo switch logic
We now always re-use the state of the repo if we're returning to it, and we always reset the windows to their default tabs.

We reset to default tabs because it's easy to implement. If people want to:
* have tab states be retained when switching
* have tab states specific to the current repo retained when switching back

Then we'll need to revisit this
2023-07-30 18:35:23 +10:00
9c15ba0c0b Add test for retained context focus when switching worktrees 2023-07-30 18:35:23 +10:00
b3060065d9 Support fastforwarding worktree 2023-07-30 18:35:23 +10:00
a313b16704 Add more worktree tests 2023-07-30 18:35:23 +10:00
b93b9dae88 Add worktree tests for removing/detaching 2023-07-30 18:35:23 +10:00
277142fc4b Add worktree integration tests 2023-07-30 18:35:23 +10:00
6794149ec8 When bisecting, always mark the current commit as good/bad, not the selected
For marking as good or bad, the current commit is pretty much always the one you
want to mark, not the selected. It's different for skipping; sometimes you know
already that a certain commit doesn't compile, for example, so you might
navigate there and mark it as skipped. So in the case that the current commit is
not the selected one, we now offer two separate menu entries for skipping, one
for the current commit and one for the selected.
2023-07-29 14:44:00 +02:00
f30e09856c Add bisect menu entry that lets you choose bisect terms
This can be useful if you want to find the commit that fixed a bug (you'd use
"broken/fixed" instead of "good/bad" in this case), or if you want to find the
commit that brought a big performance improvement (use "slow/fast"). It's pretty
mind-bending to have to use "good/bad" in these cases, and swap their meanings
in your head.

Thankfully, lazygit already had support for using custom terms during the bisect
(for the case that a bisect was started on the command-line, I suppose), so all
that's needed is adding a way to specify them in lazygit.
2023-07-29 11:59:58 +02:00
f17417219a feat: add os.copyToClipboardCmd to allow for a custom command #1055 (#2784) 2023-07-29 19:35:52 +10:00
d7f84aed8a feat: add os.copyToClipboardCmd to allow for a custom command
Issue #1055

test: CopyPatchToClipboard (temporary commit for review)
2023-07-29 19:09:59 +10:00
7807b40322 Better tag creation UX
Previously we used a single-line prompt for a tag annotation. Now we're using the commit message
prompt.

I've had to update other uses of that prompt to allow the summary and description labels to
be passed in
2023-07-22 14:36:35 +10:00
b46623ebef Use fuzzy search when filtering a view
This adds fuzzy filtering instead of exact match filtering, which is more forgiving of typos
and allows more efficiency.
2023-07-22 13:14:29 +10:00
932e01b41a Add test for crashing on empty menu 2023-07-20 21:08:56 +10:00
866e0a618b Add integration test for accordion mode 2023-07-19 22:17:29 +10:00
b61ca21a84 Allow checking for merge conflicts after running a custom command
We have a use-case to rebind 'm' to the merge action in the branches panel. There's three ways to handle this:
1) For all global keybindings, define a per-panel key that invokes it
2) Give a name to all controller actions and allow them to be invoked in custom commands
3) Allow checking for merge conflicts after running a custom command so that users can add their own 'git merge' custom command
that matches the in-built action

Option 1 is hairy, Option 2 though good for users introduces new backwards compatibility issues that I don't want to do
right now, and option 3 is trivially easy to implement so that's what I'm doing.

I've put this under an 'after' key so that we can add more things later. I'm imagining other things like being able to
move the cursor to a newly added item etc.

I considered always running this hook by default but I'd rather not: it's matching on the output text and I'd rather something
like that be explicitly opted-into to avoid cases where we erroneously believe that there are conflicts.
2023-07-13 18:40:34 +10:00
1a36cb9f3f View filtering (#2680) 2023-07-03 12:57:11 +10:00