Refactoring some long local export and test_must_fail sequences to the shorter single line version

occurrences of ... &&
(
        VAR=VAL &&
        export VAR &&
        test_must_fail git command
) &&
...
in the test scripts have been replaced by
&&
test_must_fail env VAR=VAL git comand &&