1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
Commit Graph

4830 Commits

Author SHA1 Message Date
AzraelSec
5a740e34c7 fix: use Error method to handle the commit url copy from unknown service 2023-09-12 19:06:08 +02:00
Stefan Haller
0aad599a9b
Various debugging improvements (#3000) 2023-09-11 08:27:03 +02:00
Stefan Haller
b6c892a08a Provide a simple way to debug an integration test 2023-09-11 08:17:58 +02:00
Stefan Haller
28d12e4e5d Add debug configuration to attach to a running lazygit process
I often find it more convenient to start a lazygit process in a terminal window
and then attach to it, rather than have VS Code launch one for me.

Note that this doesn't work with "go run main.go". It does work with "make run",
however.

Make sure there's only one lazygit process running, otherwise VS Code will open
a chooser with all the running processes to pick one from, but it's pretty much
impossible to tell which is which.
2023-09-10 11:47:25 +02:00
Stefan Haller
5d5e24a48e Change "make run" to do a build and then launch lazygit
As far as I can tell, there's not much of a difference in behavior between the
two. The advantage of doing it this way is that you can attach a debugger to the
running lazygit process; see next commit.
2023-09-10 11:47:25 +02:00
Stefan Haller
de598e55a6 Hide system goroutines in callstack
I have never found a reason to see them, and they just pollute the stack window
unnecessarily.
2023-09-10 11:47:25 +02:00
Stefan Haller
0fd8392067 Format launch.json with Prettier 2023-09-10 11:47:25 +02:00
Jesse Duffield
67ac2c5d9b
Change the default of the "gui.borders" config to "rounded" (#2998) 2023-09-10 12:23:25 +10:00
Jesse Duffield
7626fd7df3
Add co-author to commits (#2912) 2023-09-10 11:38:16 +10:00
Orlando Maussa
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
Stefan Haller
5b8a8d356c Change the default of the "gui.borders" config to "rounded"
Most people seem to agree that it looks better than the sharp edges of "single".
2023-09-09 10:42:24 +02:00
Stefan Haller
d7e2ca3f10
Add jump-to-panel label config setting (#2993) 2023-09-09 09:55:52 +02:00
Maria José Solano
387fbf6ab6 feat: add jump-to-panel label setting 2023-09-09 09:45:08 +02:00
Stefan Haller
917eb88617 Bump gocui 2023-09-09 09:44:50 +02:00
README-bot
005827395d Updated README.md 2023-09-09 07:35:14 +00:00
Jesse Duffield
7f9fa64074
Replace whitespace with '-' when renaming a branch (#2990) 2023-09-09 17:34:57 +10:00
README-bot
ab06a1c85c Updated README.md 2023-09-06 06:45:15 +00:00
Stefan Haller
37048911ca
Support to reset the current branch to a selected branch upstream (#2940) 2023-09-06 08:45:00 +02:00
AzraelSec
2b7b6f71ee feat: add a menu to reset current branch to a target branch upstream 2023-09-06 08:40:07 +02:00
AzraelSec
47d422bb8a chore: rename "Set/Unset upstream" menu to "Upstream Options"
This should already have been done when adding the "View divergence from
upstream" command, but now we're going to add yet another item to the menu that
is unrelated to setting or unsetting the upstream.
2023-09-06 00:23:35 +02:00
Cal Courtney
c3ca77d6bf Replace whitespace with '-' when renaming a branch 2023-09-05 14:57:18 +01:00
README-bot
a3cd1e93be Updated README.md 2023-09-05 12:01:12 +00:00
Stefan Haller
4cf8d81155
Save diff context size in state.yml instead of config.yml (#2969) 2023-09-05 14:00:55 +02:00
Stefan Haller
7774fe0ab3 Move diff context size from UserConfig to AppState 2023-09-05 13:55:30 +02:00
Stefan Haller
f7db17f7d0 Load defaults for AppState before reading from yaml
So far this hasn't been necessary because all defaults were zero values. We're
about to add the first non-zero value though, and it's important that it is
initialized correctly for users who have a state.yml that doesn't have it yet.
2023-09-04 17:50:49 +02:00
Stefan Haller
1106981827 Extract a SaveAppStateAndLogError function
It seems that most actions that change a state option and resave the state want
to just log the error.
2023-09-04 17:50:49 +02:00
Stefan Haller
1dac4158e9 Don't pass ignoreWhitespace to git commands
Now that AppState is available via common.Common, they can take it from there.
2023-09-04 17:50:49 +02:00
Stefan Haller
18c5780485 Add AppState to common.Common 2023-09-04 17:48:39 +02:00
README-bot
e895052437 Updated README.md 2023-09-04 14:58:07 +00:00
Stefan Haller
ade8d78c63
Add support for external diff commands (e.g. difftastic) (#2868) 2023-09-04 16:57:49 +02:00
Stefan Haller
2e74b7177e Fix keybinding for editing config file 2023-09-04 16:52:30 +02:00
Stefan Haller
6266e19623 Add support for external diff commands (e.g. difftastic) 2023-09-04 16:52:30 +02:00
Stefan Haller
c67aa49856 Add explicit --no-ext-diff arg to CommitCommands.ShowCmdObj
We do this for ShowFileDiffCmdObj and WorktreeFileDiffCmdObj too, so why not
here.
2023-09-04 13:16:00 +02:00
README-bot
3a54089859 Updated README.md 2023-09-04 07:45:52 +00:00
Stefan Haller
e2c447b8d0
Improve prompts when amending commits (#2980) 2023-09-04 09:45:34 +02:00
Stefan Haller
843e12286f Improve prompts when amending commits
This fixes two minor problems with the prompts:

1. When pressing shift-A in the local commits view, it would first prompt
   whether to stage all files, and then it would prompt whether to amend the
   commit at all. This doesn't make sense, it needs to be the other way round.

2. When pressing shift-A on the head commit in an interactive rebase, we would
   ask whether they want to amend the last commit, like when pressing shift-A in
   the files view. While this is technically correct, the fact that we're
   amending the head commit in this case is just an implementation detail, and
   from the user's point of view it's better to use the same prompt as we do for
   any other commit.

To fix these, we remove the confirmation panel from AmendHelper.AmendHead() and
instead add it at the two call sites, so that we have more control over this.
2023-09-01 18:55:16 +02:00
README-bot
e60936e964 Updated README.md 2023-08-31 14:13:26 +00:00
Stefan Haller
b9cfd89b80
Fix escape not cancelling filter mode, but closing the menu instead (#2977) 2023-08-31 16:13:06 +02:00
Stefan Haller
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
README-bot
ce91de76e4 Updated README.md 2023-08-30 09:22:09 +00:00
Stefan Haller
acfce07aa0
Don't show toasts when running integration tests (#2975) 2023-08-30 11:21:52 +02:00
Stefan Haller
81216189e4 Don't show toasts when running integration tests
It's pointless because you can't check for them in tests anyway, so they
unnecessarily slow down the test run by two seconds for no reason.
2023-08-30 10:54:32 +02:00
Stefan Haller
2b26b380b6
Check for staged files for "Amend commit" and "Create fixup commit" (#2970) 2023-08-29 09:23:45 +02:00
Stefan Haller
1ba8d3060b Ensure committable files for "amend to" and "create fixup commit"
These would previously fail with confusing error messages when no files were
staged.

The diff is best viewed with "ignore whitespace" turned on.
2023-08-29 09:10:59 +02:00
Stefan Haller
f561007fb7 Extract a WithEnsureCommitableFiles function
This encapsulates the logic to make sure we have something to commit; which is
to
- auto-stage all files if no files are staged and the SkipNoStagedFilesWarning
config is on
- otherwise, prompt the user whether they want to stage all files
- error out if we don't have any files at all

Of these, the first one was only done when committing with the built-in commit
message panel; there's no reason why it shouldn't also be done when committing
with the editor, or when amending, and now it is.
2023-08-29 09:10:59 +02:00
Stefan Haller
a63d5891e2
Add command to show divergence from upstream (#2871) 2023-08-29 08:22:44 +02:00
Stefan Haller
df38e954f4 Add integration test for the new divergence log 2023-08-29 08:16:40 +02:00
Stefan Haller
ea532b4729 Add DoesNotContainAnyOf matcher 2023-08-29 08:16:40 +02:00
Stefan Haller
572d1b5920 Add "Show divergence from upstream" entry to Upstream menu in branches panel 2023-08-29 08:16:40 +02:00
Stefan Haller
e8fac6ca73 Extract a SubCommitsHelper from SwitchToSubCommitsController
We want to use it from BranchesController too.
2023-08-29 08:16:40 +02:00