t7001: avoid using `cd` outside of subshells
authorShubham Verma <redacted>
Thu, 11 Feb 2021 19:47:00 +0000 (01:17 +0530)
committerJunio C Hamano <redacted>
Thu, 11 Feb 2021 21:42:16 +0000 (13:42 -0800)
commit368d2782499af9fbe9db73aed2ffbba53772374a
tree79f9da7c7921c044566e1ddfbf5ffabdfbae61a6
parentdd72154149a48120f135de28b0202ac5de34d17b
t7001: avoid using `cd` outside of subshells

Avoid using `cd` outside of subshells since, if the test fails,
there is no guarantee that the current working directory is the
expected one, which may cause subsequent tests to run in the wrong
directory.

While at it, make some other tests more concise by replacing
simple subshells with `git -C`.

Signed-off-by: Shubham Verma <redacted>
Reviewed-by: Eric Sunshine <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/t7001-mv.sh
git clone https://git.99rst.org/PROJECT