touch src/part1.c Makefile &&
echo build >.gitignore &&
echo \*.o >>.gitignore &&
- git-add . &&
+ git add . &&
git-commit -m setup &&
touch src/part2.c README &&
- git-add .
+ git add .
'
test_expect_success 'clean.requireForce' '
- git-config clean.requireForce true &&
+ git config clean.requireForce true &&
! git-clean
'
'
+test_expect_success 'core.excludesfile' '
+
+ echo excludes >excludes &&
+ echo included >included &&
+ git config core.excludesfile excludes &&
+ output=$(git clean -n excludes included 2>&1) &&
+ expr "$output" : ".*included" >/dev/null &&
+ ! expr "$output" : ".*excludes" >/dev/null
+
+'
+
test_done