Earlier commit
d63bd9a broke the case where more than one input
files are fed to mailsplit by not incrementing the base counter
when splitting second and subsequent input files. This should
fix it.
Signed-off-by: Junio C Hamano <junkio@cox.net>
error("cannot split patches from stdin");
return 1;
}
- num += ret;
+ num += (ret - nr);
+ nr = ret;
continue;
}
error("cannot split patches from %s", arg);
return 1;
}
- num += ret;
+ num += (ret - nr);
+ nr = ret;
}
printf("%d\n", num);