Jesse Duffield
96e41fa985
Only show worktree in status panel if not the main worktree and worktrees are supported
2023-07-29 17:36:18 +10:00
Jesse Duffield
4c1d706a85
Hide worktree functionality on old git versions
2023-07-29 17:36:18 +10:00
Jesse Duffield
b6d5542b35
Associate branches with worktrees even when mid-rebase
2023-07-29 17:36:18 +10:00
Jesse Duffield
72d7b91640
Assume that the base of a worktree can be checked out
2023-07-29 17:36:18 +10:00
Jesse Duffield
32ceeaa43f
i18n for worktrees
2023-07-29 17:36:18 +10:00
Jesse Duffield
82da8d7586
Don't quit on error
2023-07-29 17:36:17 +10:00
Jesse Duffield
096b8a19c5
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-29 17:36:17 +10:00
Jesse Duffield
8f51c80d76
Show base ref suggestions when creating worktree
2023-07-29 17:36:17 +10:00
Jesse Duffield
33fc54d6e2
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-29 17:36:17 +10:00
Jesse Duffield
c8dcd002e2
Checkout worktree when creating from worktree view
2023-07-29 17:36:17 +10:00
Jesse Duffield
49b8806cc4
Use 'M' for months in branches panel
2023-07-29 17:36:17 +10:00
Jesse Duffield
e2cef55f94
Fix filtering logic in worktrees view
2023-07-29 17:36:17 +10:00
Jesse Duffield
500c0eafb9
Support creating worktrees from refs
2023-07-29 17:36:17 +10:00
Jesse Duffield
e0c8a56db5
Fix wording
2023-07-29 17:36:17 +10:00
Jesse Duffield
002e4eedf5
Log when directory is changed
2023-07-29 17:36:17 +10:00
Jesse Duffield
a991525391
Handle deleting branch attached to worktree
2023-07-29 17:36:17 +10:00
Jesse Duffield
7be3658533
Update wording
2023-07-29 17:36:17 +10:00
Jesse Duffield
fd854fb7f7
Don't touch repo stack when switching worktrees
...
We shouldn't touch this cos we're doing a lateral move
2023-07-29 17:36:17 +10:00
Jesse Duffield
64711dfc2f
Move status panel presentation logic into presentation package
2023-07-29 17:36:17 +10:00
Jesse Duffield
0776ae41d3
Land in the same panel when switching to a worktree
2023-07-29 17:36:17 +10:00
Jesse Duffield
ad017f3bb8
Move current worktree to top of list
2023-07-29 17:36:17 +10:00
Jesse Duffield
9eb9ce88b3
Prompt to switch to worktree when branch is checked out by other worktree
2023-07-29 17:36:17 +10:00
Jesse Duffield
7af9715a1b
Use git lingo
2023-07-29 17:36:17 +10:00
Jesse Duffield
dbd32f63dd
Improve name handling
2023-07-29 17:36:17 +10:00
Jesse Duffield
d7aca1bcbd
Use sentence case
2023-07-29 17:36:17 +10:00
Jesse Duffield
72c856ac13
Refactor
2023-07-29 17:36:17 +10:00
Jesse Duffield
038de926b3
Update worktree model
2023-07-29 17:36:17 +10:00
Jesse Duffield
4c471dff83
Alert when attempting to enter the current worktree
2023-07-29 17:36:17 +10:00
Jesse Duffield
c1ea17b66f
Remove comment
2023-07-29 17:36:17 +10:00
Joel Baranick
b22f936522
Address PR comments
2023-07-29 17:36:17 +10:00
Joel Baranick
53e408f156
Basic support for adding a worktree
2023-07-29 17:36:17 +10:00
Joel Baranick
46bb9bb60b
Put all worktree i18n strings together
...
Use tabwriter to align worktree panel contents
2023-07-29 17:36:17 +10:00
Joel Baranick
b10670ba44
Improve worktree panel
2023-07-29 17:36:17 +10:00
Joel Baranick
f13f85de8e
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-29 17:36:17 +10:00
Joel Baranick
141011aaae
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-29 17:36:17 +10:00
Joel Baranick
4a2c54e5d8
Update status to differentiate the main vs linked worktrees
2023-07-29 17:36:17 +10:00
Joel Baranick
2f156b3438
Support for deleting a worktree
2023-07-29 17:36:17 +10:00
Joel Baranick
eded08bacf
Initial addition of support for worktrees
2023-07-29 17:36:17 +10:00
Jesse Duffield
429225da80
Support random order of command execution in unit tests
...
Now that we run code concurrently in our loaders, we need to handle that in our tests.
We could enforce a deterministic ordering by mocking waitgroup or something like that,
but I think it's fine to let our tests handle some randomness given that prod itself
will have that randomness.
I've removed the patch test file because it was clunky, not providing much value, and
it would have been hard to refactor to the new pattern
2023-07-29 12:36:17 +10:00
Jesse Duffield
39b77c0fca
Have staging refresh wait for files to refresh first
2023-07-29 10:20:15 +10:00
Jesse Duffield
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
Jesse Duffield
272e021c08
Refactor reflog commit loader
...
No functional changes
2023-07-29 10:04:11 +10:00
Jesse Duffield
862ebd25cb
Speed up remote loader
...
We're:
* using concurrency with wait groups
* avoiding regex
* processing lines of input as they come rather than storing everything in one string
* avoiding an inner loop by creating a mapping of remote names to branches
2023-07-29 10:04:11 +10:00
Jesse Duffield
5d8a85f7e7
Use wait groups to speed up commit loading
...
The speedup is most noticeable on first load, when we haven't yet fetched out main branches.
I saw a speedup from 105ms to 60ms. On subsequent loads the gain is more modest;
54ms to 40ms
2023-07-29 10:04:11 +10:00
Jesse Duffield
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
Jesse Duffield
71cab4fadc
Log duration of commands
...
This will help us diagnose performance issues
2023-07-29 09:39:22 +10:00
Jesse Duffield
09ce430240
Log duration of refresh
2023-07-29 09:39:10 +10:00
Stefan Haller
67a7293e79
Show error when trying to open patch menu with an empty patch
2023-07-26 14:27:18 +02:00
hatredholder
75674d819c
bring back yaml library fork
2023-07-26 12:50:39 +03:00
Jesse Duffield
c4e27bf96c
Revert "Fix flakey pull_merge_conflict test"
...
This reverts commit 90613056ce , or the part that removed
a goroutine at least.
Reverting because this has caused an infinite wait for push/pull on windows.
We'll need to find out why that happens separately
2023-07-24 21:12:03 +10:00