aerc/commands/msg
Robin Jarry c816103a24 pipe: fix ordering by message id for long patch series
Git send-email Message-Id headers have the following format:

   DATETIME.PID-NUM-COMMITTER

Unfortunately, when there are more than 9 patches, the patch number
(NUM) is not zero-padded which makes ascii sorting invalid, e.g.:

   1 10 11 12 2 3 4 5 6 7 8 9

Instead of:

   1 2 3 4 5 6 7 8 9 10 11 12

We need the patches to be ordered correctly to pipe them to git am.

Make sure to pad the patch number with zero characters to allow series
of up to 999 patches.

Only re-order messages before piping them if all the Message-Id headers
look like git-send-email headers.

Link: https://github.com/git/git/blob/v2.36.0/git-send-email.perl#L1197
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Koni Marti <koni.marti@gmail.com>
2022-08-01 09:38:15 +02:00
..
archive.go logging: added a log on panic 2022-03-23 20:56:09 +01:00
copy.go visual-mode: deselect messages after performing command 2022-06-14 22:12:42 +02:00
delete.go delete: improve find next function 2022-07-26 11:34:31 +02:00
forward.go logging: use level-based logger functions 2022-07-23 22:52:15 +02:00
invite.go invites: reply with accept, accept-tentative or decline 2022-05-31 14:32:24 +02:00
mark.go visual-mode: deselect messages after performing command 2022-06-14 22:12:42 +02:00
modify-labels.go visual-mode: deselect messages after performing command 2022-06-14 22:12:42 +02:00
move.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
msg.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
pipe.go pipe: fix ordering by message id for long patch series 2022-08-01 09:38:15 +02:00
read.go visual-mode: deselect messages after performing command 2022-06-14 22:12:42 +02:00
recall.go logging: use level-based logger functions 2022-07-23 22:52:15 +02:00
reply.go tabs: rename SelectedTab to SelectedTabContent 2022-07-23 22:00:21 +02:00
toggle-threads.go msgstore: implement a uid-based architecture 2022-07-26 11:34:19 +02:00
unsubscribe.go logging: use level-based logger functions 2022-07-23 22:52:15 +02:00
unsubscribe_test.go Fix linter warnings 2021-02-26 22:14:58 +01:00
utils.go tabs: rename SelectedTab to SelectedTabContent 2022-07-23 22:00:21 +02:00