t1500: more 'git rev-parse --git-dir' tests
Extend t1500 with tests of 'git rev-parse --git-dir' when invoked from other directories of the repository or the work tree. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
8fb3c00d2e
commit
db7fee8758
@ -37,17 +37,17 @@ test_rev_parse() {
|
|||||||
|
|
||||||
ROOT=$(pwd)
|
ROOT=$(pwd)
|
||||||
|
|
||||||
test_rev_parse toplevel false false true ''
|
test_rev_parse toplevel false false true '' .git
|
||||||
|
|
||||||
cd .git || exit 1
|
cd .git || exit 1
|
||||||
test_rev_parse .git/ false true false ''
|
test_rev_parse .git/ false true false '' .
|
||||||
cd objects || exit 1
|
cd objects || exit 1
|
||||||
test_rev_parse .git/objects/ false true false '' "$ROOT/.git"
|
test_rev_parse .git/objects/ false true false '' "$ROOT/.git"
|
||||||
cd ../.. || exit 1
|
cd ../.. || exit 1
|
||||||
|
|
||||||
mkdir -p sub/dir || exit 1
|
mkdir -p sub/dir || exit 1
|
||||||
cd sub/dir || exit 1
|
cd sub/dir || exit 1
|
||||||
test_rev_parse subdirectory false false true sub/dir/
|
test_rev_parse subdirectory false false true sub/dir/ "$ROOT/.git"
|
||||||
cd ../.. || exit 1
|
cd ../.. || exit 1
|
||||||
|
|
||||||
git config core.bare true
|
git config core.bare true
|
||||||
|
Loading…
Reference in New Issue
Block a user