git revision branch-2 / f71c49c
So it's switching to branch-2 according to that. It's failing because branch-2's smart-apply-patch.sh doesn't support dry-run mode. So when test-patch.sh is checking to see if the patch could be applied, it is actually getting applied. Then later when test-patch.sh wants it applied for real, it's already applied and the patch application fails.
The fix here is update smart-apply-patch.sh.