Commit graph

4415 commits

Author SHA1 Message Date
Jesse Duffield e57f6ff9c5 Better logic for knowing which repo we're in 2023-07-17 14:38:08 +10:00
Jesse Duffield a748294bc1 Only show worktree in status panel if not the main worktree and worktrees are supported 2023-07-17 14:10:32 +10:00
Jesse Duffield eb099c13c7 Hide worktree functionality on old git versions 2023-07-17 14:10:32 +10:00
Jesse Duffield 2ff12e6820 Associate branches with worktrees even when mid-rebase 2023-07-17 13:43:10 +10:00
Jesse Duffield a8aafbc6af Assume that the base of a worktree can be checked out 2023-07-17 09:48:37 +10:00
Jesse Duffield 67e6e4e8fd i18n for worktrees 2023-07-17 09:46:14 +10:00
Jesse Duffield a8d99a8ee7 Don't quit on error 2023-07-17 09:13:16 +10:00
Jesse Duffield 223143c834 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-16 20:44:35 +10:00
Jesse Duffield f6973cf7e4 Show base ref suggestions when creating worktree 2023-07-16 20:38:22 +10:00
Jesse Duffield e1e7e9185e 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-16 20:35:04 +10:00
Jesse Duffield 48d161dd1c Checkout worktree when creating from worktree view 2023-07-16 20:35:04 +10:00
Jesse Duffield 8ce1ed23ce Use 'M' for months in branches panel 2023-07-16 20:09:07 +10:00
Jesse Duffield 4d1352e3d0 Fix filtering logic in worktrees view 2023-07-16 20:07:04 +10:00
Jesse Duffield a7367ffcc1 Support creating worktrees from refs 2023-07-16 20:07:04 +10:00
Jesse Duffield cda40a7b75 Fix wording 2023-07-16 18:23:47 +10:00
Jesse Duffield 76c62eba7c Log when directory is changed 2023-07-16 18:23:47 +10:00
Jesse Duffield 835ca6389e Handle deleting branch attached to worktree 2023-07-16 17:59:41 +10:00
Jesse Duffield bdaf0c99ba Update wording 2023-07-16 17:31:52 +10:00
Jesse Duffield c996c29df0 Don't touch repo stack when switching worktrees
We shouldn't touch this cos we're doing a lateral move
2023-07-16 17:26:27 +10:00
Jesse Duffield dc9a6e0ea5 Move status panel presentation logic into presentation package 2023-07-16 17:15:19 +10:00
Jesse Duffield eaba9dd62d Land in the same panel when switching to a worktree 2023-07-16 14:37:49 +10:00
Jesse Duffield 3cb13f14bf Move current worktree to top of list 2023-07-16 14:23:31 +10:00
Jesse Duffield 5d52852df3 Prompt to switch to worktree when branch is checked out by other worktree 2023-07-16 14:14:09 +10:00
Jesse Duffield 7d4432c4b5 Use git lingo 2023-07-16 13:53:59 +10:00
Jesse Duffield a1235fa468 Improve name handling 2023-07-16 13:43:20 +10:00
Jesse Duffield 8b90811c65 Use sentence case 2023-07-16 12:23:35 +10:00
Jesse Duffield 2dd2b9f5e3 Refactor 2023-07-16 12:21:43 +10:00
Jesse Duffield e7484808e5 Update worktree model 2023-07-16 11:36:50 +10:00
Jesse Duffield 3245350bab Alert when attempting to enter the current worktree 2023-07-16 11:20:22 +10:00
Jesse Duffield 6e51dd1c85 Remove comment 2023-07-16 11:16:10 +10:00
Joel Baranick 77db982774 Address PR comments 2023-07-16 11:04:39 +10:00
Joel Baranick e16f56e492 Basic support for adding a worktree 2023-07-16 10:55:56 +10:00
Joel Baranick 3055944b5d Put all worktree i18n strings together
Use tabwriter to align worktree panel contents
2023-07-16 10:53:00 +10:00
Joel Baranick 6194b17ebb Improve worktree panel 2023-07-16 10:50:25 +10:00
Joel Baranick 15ffb34474 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-16 10:48:22 +10:00
Joel Baranick 32409dbb2f 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-16 10:32:36 +10:00
Joel Baranick 4ec960f07d Update status to differentiate the main vs linked worktrees 2023-07-16 10:29:08 +10:00
Joel Baranick a7bdc6be01 Support for deleting a worktree 2023-07-16 10:23:17 +10:00
Joel Baranick 271f894106 Initial addition of support for worktrees 2023-07-16 10:20:36 +10:00
Stefan Haller 7e9f669421
Show all tags in commits panel (#2776) 2023-07-15 13:11:44 +02:00
Stefan Haller 6b769fb138 Fix populating the Commit.Tags field
We now store all tags in this field if there are several.
2023-07-15 13:07:02 +02:00
Stefan Haller cc835a813e Extend commit_loader test to show how the Tags field is populated
It shows that right now, we take only the first tag if there are multiple.
Judging from how the code is written, I'm not sure this was intentional.
2023-07-15 13:07:02 +02:00
Stefan Haller 6103a4d13c
Fix potentially wrong help text in commit message panel (#2777) 2023-07-15 13:06:16 +02:00
Stefan Haller 69575dd4f3 Fix potentially wrong help text in commit message panel
It said "Press tab to toggle focus", which is wrong for people who remapped
their togglePanel key binding to something else. Print the actual key binding
instead.
2023-07-15 13:03:13 +02:00
README-bot bfcff3222c Updated README.md 2023-07-15 06:44:44 +00:00
Jesse Duffield 5adea789d0
Add test for cmd obj cloning (#2780) 2023-07-15 16:44:30 +10:00
Jesse Duffield 78bbdca757 Add test for cmd obj cloning 2023-07-15 11:05:43 +10:00
Stefan Haller 5cb82a49f8
config: rely on .gitconfig for verbose commit messages (#2664)
As discussed in https://github.com/jesseduffield/lazygit/pull/2599, it
makes more sense to have the user specify whether they want verbose
commits from their own git config, rather than lazygit config.

This means that we can remove all the code (including test coverage)
associated with the custom verbose flag, and lazygit will just inherit
the .gitconfig settings automatically.

---

Tested visually locally, as well as running the tests that all pass.
2023-07-14 08:05:22 +02:00
Scott Callaway 9617737352 config: rely on .gitconfig for verbose commit messages
As discussed in https://github.com/jesseduffield/lazygit/pull/2599, it
makes more sense to have the user specify whether they want verbose
commits from their own git config, rather than lazygit config.

This means that we can remove all the code (including test coverage)
associated with the custom verbose flag, and lazygit will just inherit
the .gitconfig settings automatically.
2023-07-14 07:56:09 +02:00
Jesse Duffield a251f6ad6c
Allow checking for merge conflicts after running a custom command (#2773) 2023-07-13 18:43:25 +10:00