t5701: modernize style
commitf27e7654de8ff609bf5c48e35f2d27ef1ff3676e
authorJeff King <peff@peff.net>
Sat, 26 May 2012 03:42:53 +0000 (25 23:42 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 29 May 2012 20:22:13 +0000 (29 13:22 -0700)
treead335c2409e9d678093bbd207cb73fe8fd37735e
parenta8f49338955c4c6b593d6018518c6e0ce9d3059d
t5701: modernize style

This test is pretty old and did not follow some of our more
modern best practices. In particular:

  1. It chdir'd all over the place, leaving later tests to
     deal with the fallout. Do our chdirs in subshells
     instead.

  2. It did not use test_must_fail.

  3. It did not use test_line_count.

  4. It checked for the non-existence of a ref by looking in the
     .git/refs directory (since we pack refs during clone
     these days, this will always be succeed, making the
     test useless).

     Note that one call to "-e .git/refs/..." remains,
     because it is checking for the existence of a symbolic
     ref, not a ref itself.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5701-clone-local.sh