Junio C Hamano <gitster@xxxxxxxxx> writes: > You may have noticed that the new git-send-email reversed the order of six > patch files (one cover and five patches) I gave from the command line. > Please consider this series as a bug report ;-) > > I think the bug is that "pop @ARGV" should read "shift @ARGV" or something > silly and trivial like that, but it is getting late, so I won't debug > tonight. Perhaps this is a good enough fix? Very lightly tested. -- >8 -- send-email: do not reverse the command line arguments The loop picks elements from @ARGV one by one, sifts them into arguments meant for format-patch and the script itself, and pushes them to @files and @rev_list_opts arrays. Pick elements from @ARGV starting at the beginning using shift, instead of at the end using pop, as push appends them to the end of the array. Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> --- git-send-email.perl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git c/git-send-email.perl w/git-send-email.perl index 7508f8f..45beb9c 100755 --- c/git-send-email.perl +++ w/git-send-email.perl @@ -421,7 +421,7 @@ EOF # Now that all the defaults are set, process the rest of the command line # arguments and collect up the files that need to be processed. my @rev_list_opts; -while (my $f = pop @ARGV) { +while (defined(my $f = shift @ARGV)) { if ($f eq "--") { push @rev_list_opts, "--", @ARGV; @ARGV = (); -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html