Caesar's civil war was illegal under the laws of the Roman Republic. Caesar successfully took power, so there was no one to enforce those laws, but he did break them, and ultimately, the Republic. As far as I know Caesar never even bothered legitimizing his war or self-pardoning - he didn't need to, he won and the Senate made him dictator for life.
> So while the exact details of "Title 10" and "Posse Comitatus" are very important to an army before they cross the Rubicon - if they do cross the Rubicon the law will suddenly turn out to be far more flexible than anyone expected, and it'll turn out their actions were legal after all.
This is very important: only if they win will their illegal actions go without punishment, and winning is not guaranteed.
There is a reason we generally prefer the rule of law to the rule of power.
But if an army actually crosses the Rubicon? Turns out that law doesn't count for much when the other guy has an army, and all the senators have to flee the country.
Then the guy with the army is in charge. He can retrospectively legalise his actions, grant himself a pardon, and fill recently-vacated positions of power with allies who'll sign it all off.
So while the exact details of "Title 10" and "Posse Comitatus" are very important to an army before they cross the Rubicon - if they do cross the Rubicon the law will suddenly turn out to be far more flexible than anyone expected, and it'll turn out their actions were legal after all.