From 54fef1025358a087012142580436b2a494ca8665 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Tue, 19 Jul 2022 09:11:54 -0400 Subject: submit: reverse order returned by rev-list git-rev-list returns patches in reverse chronological order by default, which is the opposite of what we need. Add a --reverse to the call to get the expected behaviour. Reported-by: Mattijs Korpershoek Link: https://lore.kernel.org/tools/87ilnti947.fsf@baylibre.com/ Signed-off-by: Konstantin Ryabitsev --- b4/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b4/__init__.py b/b4/__init__.py index 6af2acd..b3aa84f 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -2427,7 +2427,7 @@ def git_range_to_patches(gitdir: Optional[str], start: str, end: str, extrahdrs: Optional[List[Tuple[str, str]]] = None, keepdate: bool = False) -> List[Tuple[str, email.message.Message]]: patches = list() - commits = git_get_command_lines(gitdir, ['rev-list', f'{start}..{end}']) + commits = git_get_command_lines(gitdir, ['rev-list', '--reverse', f'{start}..{end}']) if not commits: raise RuntimeError(f'Could not run rev-list {start}..{end}') for commit in commits: -- cgit v1.2.3