diff: add tests for --relative without optional prefix value
authorJacob Keller <jacob.keller@gmail.com>
Sat, 9 Dec 2017 20:40:12 +0000 (21:40 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 Dec 2017 00:13:42 +0000 (16:13 -0800)
commit6d7c17ec9d4b6c384648d5bc28bc234e3083c66e
treef8ef0b82d171081d321975521a7adb09b99447a7
parent1efad51197f52ba9fb928b92a7f92514ab02a97f
diff: add tests for --relative without optional prefix value

We already have tests for --relative, but they currently only test when
a prefix has been provided. This fails to test the case where --relative
by itself should use the current directory as the prefix.

Teach the check_$type functions to take a directory argument to indicate
which subdirectory to run the git commands in. Add a new test which uses
this to test --relative without a prefix value.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4045-diff-relative.sh