Commit graph

654 commits

Author SHA1 Message Date
Stefan Haller
e8d365f1aa Add breaking change notice about 'stream: true' being converted to not use a pty any more 2025-05-01 16:09:10 +02:00
Stefan Haller
0496e3af50 Disallow creating custom patches when the diff context size is 0
This is very similar to what we are doing for staging or discarding hunks in the
Files panel. Git doesn't allow applying patches with a zero context size (unless
you use the --unidiff-zero option, which is discouraged).
2025-04-29 10:21:18 +02:00
Stefan Haller
30868eead8 Add new command "Move commits to new branch" 2025-04-21 18:12:50 +02:00
Stefan Haller
7495854243 Add a breaking changes hint for the new auto-forward behavior 2025-04-21 18:06:09 +02:00
Stefan Haller
eaaa937315 Add config for auto-forwarding branches after fetching 2025-04-21 18:06:09 +02:00
Stefan Haller
1a93b2324b Allow focussing the main view
In this commit this is only possible by pressing '0' in a side panel; we'll add
mouse clicking later in the branch.

Also, you can't really do anything in the focused view except press escape to
leave it again. We'll add some more functionality in a following commit.
2025-04-21 18:03:19 +02:00
Stefan Haller
74054c9d70 Remove the "YOU ARE HERE" marker
Now that we have sections, it is no longer needed.

Keep the "<-- CONFLICTS" marker though.
2025-04-20 16:06:15 +02:00
Stefan Haller
6cbc1e0ace Add section headers for rebase todos, cherry-picks, reverts, and actual commits 2025-04-20 16:06:15 +02:00
Stefan Haller
945b023eb5 Support range selection for reverting commits 2025-04-20 16:03:06 +02:00
Stefan Haller
f14a3cdd46 Remove the "Select parent commit" prompt when reverting a merge commit
In pretty much 100% of the cases, you want to use -m1, so spare users the
complexity of a confusing prompt.

See
https://public-inbox.org/git/e60a8b1a-98c8-4ac7-b966-ff9635bb781d@haller-berlin.de/
for some discussion.
2025-04-20 16:03:06 +02:00
Stefan Haller
b350876f84 Disallow any changes to commits or todos when cherry-picking or reverting
We treat the .git/sequencer/todo file as read-only. Technically it seems it
would be possible to treat it as modifiable in the same way as
.git/rebase-merge/git-rebase-todo, effectively turning a cherry-pick or revert
that stops at a conflict into an interactive rebase; however, git itself doesn't
allow this (there is no "git cherry-pick --edit-todo"), so it seems safer not to
rely on it.

Theoretically it would be possible to allow modifying the rebase todos when a
cherry-pick or revert conflicts in the middle of a rebase. However, it would
introduce a bit of complexity to support this, as we would have to be able to
distinguish between rebasing todos and cherry-picking/reverting todos, which we
currently can't; it could also be a bit error-prone as far as edge cases are
concerned. And it's really a pretty uncommon situation, so it doesn't seem worth
it, and we just forbid all modifications to todos whenever we are cherry-picking
or reverting.
2025-04-20 15:55:44 +02:00
Stefan Haller
ff465e2581 Show original todo action instead of "conflict", and show <-- CONFLICT instead
It is useful to see if the conflicted commit was a "pick" or an "edit". What's
more, we're about to add support for showing cherry-picks and reverts, and
seeing that a conflicted commit was a revert is important because its diff is
backwards compared to the diff of the conflicting files in the Files panel.
2025-04-20 15:55:44 +02:00
Stefan Haller
362678e2ef Mention which command is continued in PromptToContinueRebase
When you are in the middle of a rebase, and you cherry-pick a commit which
conflicts, it helps to be clear on whether you are prompted to continue the
cherry-pick or the rebase.
2025-04-20 15:53:17 +02:00
Stefan Haller
542525743c Make WorkingTreeState a struct, and add cherry-picking and reverting states 2025-04-20 15:53:17 +02:00
Stefan Haller
204f6c7edb Update translation files from crowdin 2025-04-10 11:40:55 +02:00
Stefan Haller
80b5e21bd5 Add a command to select all commits of the current branch
This is useful for seeing the combined diff of all commits of a branch.
2025-04-10 09:02:09 +02:00
Stefan Haller
b3bffbec4a Show "hooks disabled" in title bar of commit message editor
It is shown either when committing with `w`, or when typing the skipHooks prefix
if there is one. This should hopefully make it clearer when the hooks are run
and when they are not.
2025-04-10 08:57:32 +02:00
Stefan Haller
b78aa54439 Use dario.cat/mergo instead of github.com/imdario/mergo
It's the new canonical location as of 1.0.0, the old one is deprecated and stuck
on 0.3.something.
2025-04-09 11:23:55 +02:00
Stefan Haller
ad813503fb Bump minimum required git version to 2.22
Versions older than 2.22 have issues with "git cherry-pick --continue" and
"git cherry-pick --skip" that are difficult to work around.
2025-04-09 10:40:52 +02:00
Stefan Haller
ebb576feac Provide conflict resolution dialogs for non-textual conflicts 2025-04-09 10:27:57 +02:00
Stefan Haller
2e1be45957 Better main view display for conflicing files
For the less common conflict types DD, AU, UA, DU, and UD, we would previously
only show "* Unmerged path" in the main view, which isn't helpful. Also, for
some of these we would split the main view and show this text both in the
unstaged changes and staged changes views, which is a bit embarrassing.

Improve this by offering more explanation about what's going on, and what the
most likely way to resolve the situation is for each case.
2025-04-09 10:27:57 +02:00
Stefan Haller
d13306ac64 Add a breaking changes entry for using shell aliases 2025-04-07 14:35:40 +02:00
Brandon
f75c0af6e0 Update disabled message 2025-04-07 09:42:19 +02:00
gaogao-qwq
3a03aebd89
feat: Implement range stash drop
Signed-off-by: gaogao-qwq <gaogaoqwq@gmail.com>
2025-04-02 17:34:35 +08:00
Stefan Haller
a8f6b04ff3 Add "Absolute path" item to the file view's copy menu
Rename the existing item to "Relative path".
2025-03-25 10:00:56 +01:00
Stefan Haller
728f0d9dfa Remove text that is now unused 2025-03-22 11:06:15 +01:00
Cesar Andres
5de735f1ac feat(submodules): add method to bulk init and update submodules 2025-03-22 09:54:32 +01:00
Stefan Haller
f7295a97c0 Add a "Content of selected file" entry to the copy menu for commit files
This is useful for copying the entire content of the selected file as it was at
the selected commit.

We only add it to the commit files panel; it is not needed in the files panel,
because there you can simply press "e" to edit the file.
2025-03-20 11:52:53 +01:00
Stefan Haller
c18d8af9f4 Use a WithWaitingStatus for rewording a non-head commit
Rewording a commit at the beginning of a long branch can take very long;
without this change, the commit message panel would stay visible with a blinking
cursor during that time, which is very confusing.

This has the slight downside that it will say "Rebasing" in the lower right
corner until the operation is done; but we already have this problem when doing
custom patch operations, or dropping changes from a commit, so it's not new, and
we can think about how to fix all these another time.
2025-03-06 08:15:18 +01:00
Stefan Haller
22512d55a8 Add commandMenu property to custom commands 2025-02-28 10:11:30 +01:00
Stefan Haller
96934d5a1d Improve the error message when users have gpg signing turned on
It is not obvious that you can get rid of the error by using the overrideGpg
config, so tell them.
2025-02-25 11:34:57 +01:00
Chris McDonnell
0ef3832e59 docs: Add reference to confirmation key to intro message 2025-02-23 08:44:48 +01:00
Chris McDonnell
ab23539c0c Add option to copy commit message body 2025-02-17 18:43:39 +01:00
Stefan Haller
c02709698c Update translations from Crowdin
This adds a new Portuguese translation.
2025-02-12 08:21:47 +01:00
Stefan Haller
20fe43f972 Add some more information to pkg/i18n/translations/README.md 2025-02-12 08:21:47 +01:00
Stefan Haller
aad2622278 Show filter state in top right corner of Files panel frame
This includes the "only conflicting" status that the user can't switch to
themselves. We display it anyway to give a hint that files are being filtered,
and to let them know that they can turn the filter off if they want to.
2025-02-07 09:24:24 +01:00
Stefan Haller
2f4cedd025 Show current files filter as radio buttons
I renamed the "Reset filter" item to "No filter" to make it look more like a
state than an action, so that it fits the radio button concept better.

When there are conflicts and we set the filter to show only conflicting files,
then none of the radio buttons light up, which is slightly strange. I guess it's
ok though.
2025-02-07 09:24:24 +01:00
Jesse Duffield
7e85cdd027 Allow user to filter the files view to only show untracked files
This handles the situation where the user's own config says to not show
untracked files, as is often the case with bare repos managing a user's
dotfiles.
2025-02-07 09:04:55 +11:00
Stefan Haller
437daf2f74 Disable staging and unstaging lines or hunks when the diff context size is 0
Git diff and patch doesn't work reliably with a context size of 0, so disable it
in this case (and discarding changes as well). Magit does the same, see
https://github.com/magit/magit/issues/4222.

Staging entire files by pressing space in the Files panel is still possible, of
course.
2025-02-05 16:07:22 +01:00
Stefan Haller
0a78d0016e Show confirmation menu when trying to amend changes while there are conflicts 2025-01-30 08:53:34 +01:00
Anvar Umuraliev
7db8fb8e9c Add option to delete local and remote tag 2025-01-30 09:05:17 +11:00
Bruno Jesus
698f9287d4 Rename NoTags to CommitHasNoTags 2025-01-28 23:11:06 +00:00
Bruno Jesus
ef0d319686 Add copy commit tags to clipboard toast message 2025-01-28 00:33:55 +00:00
Bruno Jesus
333802fffc Copy Tags to clipboard
Add an option to copy tag(s) to the clipboard.

Works on both the Tags and Commits sections.
2025-01-27 21:53:13 +00:00
Gabriel Lanata
4065175a58 Improve undo action to restore files upon undoing a commit 2025-01-18 00:07:15 +11:00
Mauricio Trajano
7bea41534b Collapse/expand all files in tree
Co-authored-by: Stefan Haller <stefan@haller-berlin.de>
2025-01-13 21:13:11 +01:00
Mauricio Trajano
c64a7904b7 Add ability to configure branch color patterns 2025-01-12 13:44:26 +01:00
Brandon
c44231a7d7 Add number of commits to cherry-pick confirmation prompt 2025-01-08 21:08:42 -08:00
Stefan Haller
bf9339557e Show the <a-enter> keybinding at bottom of commit description view
It was hard to discover, this should make it more obvious.
2025-01-03 10:16:29 +01:00
Nathan Baulch
508cdb40a8 Fix typos 2025-01-03 10:50:36 +11:00