From 0ba956d331e4c14fb1600a62044492c6c27af71a Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 22 May 2007 01:12:17 +0100 Subject: git-status: respect core.excludesFile git-add reads this variable, and honours the contents of that file if that exists. Match this behaviour in git-status, too. Noticed by Evan Carroll on IRC. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- t/t3001-ls-files-others-exclude.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 't') diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh index db7a847a5d..fcfcfbba7d 100755 --- a/t/t3001-ls-files-others-exclude.sh +++ b/t/t3001-ls-files-others-exclude.sh @@ -79,4 +79,24 @@ test_expect_success \ >output && git diff expect output' +cat > excludes-file << EOF +*.[1-8] +e* +EOF + +git-config core.excludesFile excludes-file + +git-runstatus | grep "^# " > output + +cat > expect << EOF +# .gitignore +# a.6 +# one/ +# output +# three/ +EOF + +test_expect_success 'git-status honours core.excludesfile' \ + 'diff -u expect output' + test_done -- cgit v1.2.3