Correct comma use with "but" and "that"

In one school of thought, the first and third sentences are correct but not the second. We refer to Larry Trask's Guide to Punctuation to substantiate this claim.

In the second sentence, the second comma is a mistake (it is not a listing/joining/gapping/bracketing comma). The last two commas in the third sentence are an optional pair of bracketing commas to set off the weak interruption above that.

Note that the joining commas before but in the first and third sentences are optional.


I agree with Boob's rationale for #2, but I might also suggest rewording the sentence to something more like:

Although both are based on librsync, they behave quite differently.

In which case, you only need one comma.


If you want to keep that structure, I would go with #2, but use beyond instead:

Both are based on librsync, but beyond that, they behave quite differently.