1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-09 01:17:06 +02:00
Commit Graph

2701 Commits

Author SHA1 Message Date
3a7468ecac Support opening worktree in editor 2023-07-30 18:35:23 +10:00
7b05dacb98 Properly render worktrees in files panel 2023-07-30 18:35:22 +10:00
b73efb2c22 Better logic for knowing which repo we're in 2023-07-30 18:35:22 +10:00
a06a5cadee Only show worktree in status panel if not the main worktree and worktrees are supported 2023-07-30 18:35:22 +10:00
3cd2d6fa5c Hide worktree functionality on old git versions 2023-07-30 18:35:22 +10:00
ec839e9e96 Associate branches with worktrees even when mid-rebase 2023-07-30 18:35:22 +10:00
6f2f9f6677 Assume that the base of a worktree can be checked out 2023-07-30 18:35:22 +10:00
2082fdf84a i18n for worktrees 2023-07-30 18:35:22 +10:00
894485190b Don't quit on error 2023-07-30 18:35:22 +10:00
87b2455dbb Allow opening worktree in editor
This does the job but I think we need yet another editor command for opening a directory in a new window.
2023-07-30 18:35:22 +10:00
2e68967e02 Show base ref suggestions when creating worktree 2023-07-30 18:35:22 +10:00
71422a8549 Refresh work trees when discarding file changes
We do this because we may be deleting a worktree folder so we'll need to show that in the worktrees view
2023-07-30 18:35:22 +10:00
9c69a5df69 Checkout worktree when creating from worktree view 2023-07-30 18:35:22 +10:00
142f06357f Fix filtering logic in worktrees view 2023-07-30 18:35:22 +10:00
18ea68c23a Support creating worktrees from refs 2023-07-30 18:35:22 +10:00
4b2622d93b Fix wording 2023-07-30 18:35:22 +10:00
ae0193698e Log when directory is changed 2023-07-30 18:35:22 +10:00
6b4a638415 Handle deleting branch attached to worktree 2023-07-30 18:35:22 +10:00
6c69549ced Don't touch repo stack when switching worktrees
We shouldn't touch this cos we're doing a lateral move
2023-07-30 18:35:22 +10:00
5868750aba Move status panel presentation logic into presentation package 2023-07-30 18:35:22 +10:00
ab3052f642 Land in the same panel when switching to a worktree 2023-07-30 18:35:22 +10:00
077ae99438 Prompt to switch to worktree when branch is checked out by other worktree 2023-07-30 18:35:22 +10:00
fe8adf9eb8 Use git lingo 2023-07-30 18:35:22 +10:00
c713d550c0 Improve name handling 2023-07-30 18:35:22 +10:00
e8ec41fb0f Refactor 2023-07-30 18:35:22 +10:00
03f726038e Alert when attempting to enter the current worktree 2023-07-30 18:35:21 +10:00
796945aad0 Remove comment 2023-07-30 18:35:21 +10:00
db02c13bf6 Address PR comments 2023-07-30 18:35:21 +10:00
1ce9a87544 Basic support for adding a worktree 2023-07-30 18:35:21 +10:00
35e6e6347a Put all worktree i18n strings together
Use tabwriter to align worktree panel contents
2023-07-30 18:35:21 +10:00
54708233ac Improve worktree panel 2023-07-30 18:35:21 +10:00
c679fd1924 Style missing worktree as red and display better error when trying to switch to them
Use a broken link icon for missing worktrees
2023-07-30 18:35:21 +10:00
9a79154d05 Hide worktrees in the worktree panel if they point at a non-existing filesystem location.
Remove unneeded check when filtering out branches from non-current worktrees from the branch panel.
Add link icon for linked worktrees
2023-07-30 18:35:21 +10:00
60872c91e6 Update status to differentiate the main vs linked worktrees 2023-07-30 18:35:21 +10:00
afc4aedd4f Support for deleting a worktree 2023-07-30 18:35:21 +10:00
f8ba899b87 Initial addition of support for worktrees 2023-07-30 18:35:21 +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
39b77c0fca Have staging refresh wait for files to refresh first 2023-07-29 10:20:15 +10:00
63e5790410 Speed up refresh using concurrency and wait groups
Previously our synchronous refreshes took far longer because nothing
was happening concurrently. We now run refresh functions concurrently
and use a wait group to ensure they're all done before returning
2023-07-29 10:04:11 +10:00
5f30ccfbc3 Log duration of post-refresh-update call
Notably, the reflog view is taking ages here because it's got a
few thousand lines to write to the view.

In future we should only populate the view's viewport.
2023-07-29 09:39:22 +10:00
09ce430240 Log duration of refresh 2023-07-29 09:39:10 +10:00
67a7293e79 Show error when trying to open patch menu with an empty patch 2023-07-26 14:27:18 +02:00
4f807eeb19 Could not type special characters on non-english keyboards
On german/french/spanish keyboards, typing [ requires modifier
keys like AltGr, so the `mod==0` condition is wrong.

Fixes #2573

ch != 0 is useless because IsPrint is implemented this way:
	if uint32(r) <= MaxLatin1 {
		return properties[uint8(r)]&128 != 0
	}
with properties[0] set to 1 (so, bit 7 not set)
-> 0 is not printable.
2023-07-23 14:33:50 +02:00
c21633b1be Prompt for commit message when moving a custom patch to a new commit 2023-07-23 13:55:48 +02: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
3cee37388c Keep track of authors across local commits and branch commits for suggestions
Previously, we would only show the authors based on local commits, but sometimes you want to set a commit author
to that of a commit on another branch. Now, so long as you've viewed the branch's commits, the author will appear
as a suggestion.
2023-07-22 10:47:04 +10:00
87bf1dbc7f Only apply right-alignment on first column of keybindings menu
Previously we applied a right-align on the first column of _all_ menus, even though we really
only intended for it to be on the first column of the keybindings menu (that you get from pressing
'?')
2023-07-20 21:23:46 +10:00
373f24c80f Fix crash on empty menu
When a menu is empty (e.g. due to filtering) we shouldn't crash on focus or selection
2023-07-20 21:05:52 +10:00