aerc/commands/msg
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
..
archive.go invalidatable: cleanup dead code 2022-10-12 22:16:40 +02:00
copy.go store: extract marking behavior and add tests 2022-08-22 09:30:37 +02:00
delete.go invalidatable: cleanup dead code 2022-10-12 22:16:40 +02:00
forward.go msgpart: factorize mime type and filename construction 2022-10-16 11:35:24 +02:00
invite.go invalidatable: cleanup dead code 2022-10-12 22:16:40 +02:00
mark.go mark: fix (un)mark -a when no message is selected 2022-09-29 17:18:20 +02:00
modify-labels.go notmuch: add "tag" alias for modify-labels command 2022-10-17 22:04:46 +02:00
move.go store: extract marking behavior and add tests 2022-08-22 09:30:37 +02:00
msg.go lint: apply new formatting rules 2022-08-01 10:44:52 +02:00
pipe.go pipe: reorder patches based on email subjects 2022-10-25 22:24:31 +02:00
read.go command/read: run in main thread 2022-09-29 21:21:00 +02:00
recall.go msgpart: factorize mime type and filename construction 2022-10-16 11:35:24 +02:00
reply.go msgpart: factorize mime type and filename construction 2022-10-16 11:35:24 +02:00
toggle-threads.go invalidatable: cleanup dead code 2022-10-12 22:16:40 +02:00
unsubscribe.go invalidatable: cleanup dead code 2022-10-12 22:16:40 +02:00
unsubscribe_test.go lint: apply new formatting rules 2022-08-01 10:44:52 +02:00
utils.go util: fetch message headers for nil messages 2022-08-22 09:30:37 +02:00