aerc/commands
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
..
account sort: clear sort criteria when called without arguments 2022-07-26 22:24:01 +02:00
compose outgoing-cred-cmd: delay execution until an email needs to be sent 2022-07-31 19:53:13 +02:00
mode commands: implement a no-quit mode 2022-07-14 23:15:02 +02:00
msg pipe: fix ordering by message id for long patch series 2022-08-01 09:38:15 +02:00
msgview tabs: rename SelectedTab to SelectedTabContent 2022-07-23 22:00:21 +02:00
terminal tabs: rename SelectedTab to SelectedTabContent 2022-07-23 22:00:21 +02:00
cd.go go.mod: change base git url 2021-11-05 10:21:45 +01: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 commands: use SelectedAccountUiConfig instead of explicit nil check 2022-03-16 17:02:36 +01:00
exec.go tabs: rename SelectedTab to SelectedTabContent 2022-07-23 22:00:21 +02:00
global.go Implement basic tab completion support 2019-06-29 14:24:19 -04:00
help.go help: add completions 2022-05-23 20:59:10 +02:00
history.go Add command history and cycling 2019-07-26 14:29:34 -04:00
move-tab.go tabs: make fields private 2022-07-23 22:00:25 +02:00
new-account.go go.mod: change base git url 2021-11-05 10:21:45 +01: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 commands: implement prompt completion 2022-07-02 18:36:40 +02:00
pwd.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
quit.go commands: implement a no-quit mode 2022-07-14 23:15:02 +02:00
set.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
term.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
util.go logging: added a log on panic 2022-03-23 20:56:09 +01:00