aerc/commands
Robin Jarry a381630604 pipe: reorder patches based on email subjects
The Message-Id header cannot be relied upon as users can tweak it before
sending. The subject seems a more reliable basis to reorder patches.

Change the logic of sorting. Previously, all messages were required to
look like patches to be sorted. Now if at least one message looks like
a patch, all messages will be sorted by Subject before piping them.
Since `git am` ignores non-patch messages, it should allow piping series
of emails including reviews and comments without getting confusing
errors.

I have tested that this works on multiple series that appeared out of
order in my INBOX with the following command (after marking the
messages):

  :pipe -m sed -n 's/^Subject: //p'

Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
2022-10-25 22:24:31 +02:00
..
account split: clamp minimum split size to 1 2022-10-20 22:17:18 +02:00
compose compose: warn before sending without attachment 2022-10-17 22:41:00 +02:00
mode lint: simplify code (gosimple) 2022-08-04 21:57:52 +02:00
msg pipe: reorder patches based on email subjects 2022-10-25 22:24:31 +02:00
msgview msgview: enable next/prev with unfetched headers 2022-10-19 21:51:16 +02:00
terminal lint: apply new formatting rules 2022-08-01 10:44:52 +02:00
cd.go statusline-format: add %p placeholder for current path 2022-09-19 21:25:10 +02:00
choose.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
commands.go commands: implement prompt completion 2022-07-02 18:36:40 +02:00
ct.go lint: homogenize operations and minor fixes (gocritic) 2022-08-04 21:58:01 +02:00
exec.go tabs: rename SelectedTab to SelectedTabContent 2022-07-23 22:00:21 +02:00
global.go lint: apply new formatting rules 2022-08-01 10:44:52 +02:00
help.go command/help: remove helpClose function 2022-10-19 21:01:55 +02:00
history.go history: store command history in a file 2022-09-14 20:51:51 +02:00
move-tab.go lint: work nicely with wrapped errors (errorlint) 2022-08-04 21:58:04 +02:00
new-account.go lint: homogenize operations and minor fixes (gocritic) 2022-08-04 21:58:01 +02:00
next-tab.go statusline: implement per-account status 2022-03-18 23:42:07 +01:00
pin-tab.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
prompt.go lint: apply new formatting rules 2022-08-01 10:44:52 +02:00
pwd.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
quit.go lint: homogenize operations and minor fixes (gocritic) 2022-08-04 21:58:01 +02:00
set.go lint: apply new formatting rules 2022-08-01 10:44:52 +02:00
term.go invalidatable: cleanup dead code 2022-10-12 22:16:40 +02:00
util.go util: fetch message headers for nil messages 2022-08-22 09:30:37 +02:00
z.go commands: add zoxide support via :z 2022-09-13 23:22:50 +02:00