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@pobox.com>
This commit is contained in:
@ -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 = ();
|
||||
|
Reference in New Issue
Block a user