git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Darrin Thompson <darrint@progeny.com>
To: Junio C Hamano <junkio@cox.net>
Cc: Git Mailing List <git@vger.kernel.org>,
	Linus Torvalds <torvalds@osdl.org>
Subject: Re: git-ls-files -o no recurse?
Date: Sat, 07 Jan 2006 13:20:55 -0500	[thread overview]
Message-ID: <1136658055.6141.1.camel@localhost.localdomain> (raw)
In-Reply-To: <7vk6ddq8x2.fsf@assigned-by-dhcp.cox.net>

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.sh
b/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

  reply	other threads:[~2006-01-07 18:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-04 18:51 git-ls-files -o no recurse? Darrin Thompson
2006-01-04 21:31 ` Linus Torvalds
2006-01-05 17:15   ` Darrin Thompson
2006-01-05 17:31     ` Linus Torvalds
2006-01-06 22:38   ` Junio C Hamano
2006-01-07 18:20     ` Darrin Thompson [this message]
2006-01-07 18:23     ` Darrin Thompson
2006-01-07 18:45       ` Junio C Hamano
2006-01-07 19:34         ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1136658055.6141.1.camel@localhost.localdomain \
    --to=darrint@progeny.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).