The quoted sentence is a piece of rhetoric in which Michael Herr belittles Operation Pegasus by proxy, distancing himself from the criticism by placing it in the mouth of Stendhal, who is a convenient spokesman because he’s dead and can’t complain about being misrepresented.
An “outpost” is “a detachment of soldiers situated at a distance from the main body of an army” (OED) and an “affair of outposts” is a skirmish between outposts, a minor event that does not involve the main armies and on which the outcome of the battle does not depend. The phrase in English is most likely a calque of the French “affaire des avant-postes”. Here’s an early example of its use:
On ne sait jusqu’à quel point l’affaire des avant-postes auprès de Taroutina influa, le 18 octobre, sur les déterminations de Napoléon
[We don’t know how much the affair of outposts near Tarutino influenced Napoléon’s decisions on 18th October]
Pierre Blanchard, ed. (1818). Histoire des batailles, siéges et combats des Français, depuis 1792 jusqu’en 1815, volume IV, p. 69.
The phrase “affaire des avant-postes” does not appear in Stendhal’s published work, so it is hard to say exactly how he would have used it, but Operation Pegasus involved tens of thousands on each side, making it comparable in scale to battles like Tarutino itself, and not to skirmishes like the “affair of outposts” that preceded it, so it is unlikely that Stendhal would have said what Herr makes him say.
I do not know why Herr picked Stendhal to be his mouthpiece. Perhaps he had been reading Vie de Napoléon, which does have an “attaque d’avant-postes”.