Re: git-ls-files -o no recurse?
From: Darrin Thompson <hidden>
Date: 2016-06-15 22:42:16
This adds a test a test for the --directory option to git-ls-files. Is '--directory' really what we want? t/t3003-ls-files-others-directory.sh | 38 ++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) create mode 100644 t/t3003-ls-files-others-directory.sh applies-to: 5001806332081159b00c35291d6aea232ed7e909 d484a8477d430a5fb2cefd2cf7008a5973d1fea5
diff --git a/t/t3003-ls-files-others-directory.shb/t/t3003-ls-files-others-directory.sh new file mode 100644 index 0000000..d1d3d86
--- /dev/null
+++ b/t/t3003-ls-files-others-directory.sh@@ -0,0 +1,38 @@ +#!/bin/sh +# +# Copyright (c) 2005 Darrin Thompson +# Based on an earlier test by Junio C Hamano +# + +test_description='git-ls-files test (--others --directory) + +This test runs git-ls-files --others --directory with the following on +the filesystem. + + path0 - a file + path1 - a symlink + path2/file2 - a file in a directory + +The --directory option should cause path2 to be in the listing, but +not path2/file2. +' +. ./test-lib.sh + +date >path0 +ln -s xyzzy path1 +mkdir path2 +date >path2/file2 +test_expect_success \ + 'git-ls-files --directory --others to show output.' \ + 'git-ls-files --directory --others >output' +cat >expected <<EOF +output +path0 +path1 +path2 +EOF + +test_expect_success \ + 'git-ls-files --directory --others should not pick up dir
contents.' \ + 'diff output expected' +test_done --- 0.99.9i