aboutsummaryrefslogtreecommitdiff
path: root/t/t3001-ls-files-others-exclude.sh
Commit message (Collapse)AuthorAge
* Merge branch 'fg/exclude-bq'Junio C Hamano2009-03-05
|\ | | | | | | | | * fg/exclude-bq: Support "\" in non-wildcard exclusion entries
| * Support "\" in non-wildcard exclusion entriesFinn Arne Gangstad2009-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "\" was treated differently in exclude rules depending on whether a wildcard match was done. For wildcard rules, "\" was de-escaped in fnmatch, but this was not done for other rules since they used strcmp instead. A file named "#foo" would not be excluded by "\#foo", but would be excluded by "\#foo*". We now treat all rules with "\" as wildcard rules. Another solution could be to de-escape all non-wildcard rules as we read them, but we would have to do the de-escaping exactly as fnmatch does it to avoid inconsistencies. Signed-off-by: Finn Arne Gangstad <finnag@pvv.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | test overlapping ignore patternsMichael J Gruber2008-12-18
|/ | | | | | | | | Add a test which checks that negated patterns such as "!foo.html" can override previous patterns such as "*.html". This is documented behaviour but had not been tested so far. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* tests: use "git xyzzy" form (t0000 - t3599)Nanako Shiraishi2008-09-03
| | | | | | | Converts tests between t0050-t3903. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* tests: do not use implicit "git diff --no-index"Junio C Hamano2008-05-24
| | | | | | | | | | | As a general principle, we should not use "git diff" to validate the results of what git command that is being tested has done. We would not know if we are testing the command in question, or locating a bug in the cute hack of "git diff --no-index". Rather use test_cmp for that purpose. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* add test_cmp function for test scriptsJeff King2008-03-13
| | | | | | | | | | | | | | | | | | | Many scripts compare actual and expected output using "diff -u". This is nicer than "cmp" because the output shows how the two differ. However, not all versions of diff understand -u, leading to unnecessary test failure. This adds a test_cmp function to the test scripts and switches all "diff -u" invocations to use it. The function uses the contents of "$GIT_TEST_CMP" to compare its arguments; the default is "diff -u". On systems with a less-capable diff, you can do: GIT_TEST_CMP=cmp make test Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* gitignore(5): Allow "foo/" in ignore list to match directory "foo"Junio C Hamano2008-02-05
| | | | | | | | | | | | | | | | | | | | | | A pattern "foo/" in the exclude list did not match directory "foo", but a pattern "foo" did. This attempts to extend the exclude mechanism so that it would while not matching a regular file or a symbolic link "foo". In order to differentiate a directory and non directory, this passes down the type of path being checked to excluded() function. A downside is that the recursive directory walk may need to run lstat(2) more often on systems whose "struct dirent" do not give the type of the entry; earlier it did not have to do so for an excluded path, but we now need to figure out if a path is a directory before deciding to exclude it. This is especially bad because an idea similar to the earlier CE_UPTODATE optimization to reduce number of lstat(2) calls would by definition not apply to the codepaths involved, as (1) directories will not be registered in the index, and (2) excluded paths will not be in the index anyway. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Replace "runstatus" with "status" in the testsJohannes Schindelin2007-11-22
| | | | | | | | We no longer have "runstatus", but running "status" is no longer that expensive anyway; it is a builtin. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Rewrite "git-frotz" to "git frotz"Junio C Hamano2007-07-02
| | | | | | This uses the remove-dashes target to replace "git-frotz" to "git frotz". Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-status: respect core.excludesFileJohannes Schindelin2007-05-21
| | | | | | | | | | 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 <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Get rid of the dependency to GNU diff in the testsJohannes Schindelin2007-03-04
| | | | | | | | | | | | | | | Now that "git diff" handles stdin and relative paths outside the working tree correctly, we can convert all instances of "diff -u" to "git diff". This commit is really the result of $ perl -pi.bak -e 's/diff -u/git diff/' $(git grep -l "diff -u" t/) Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net> (cherry picked from commit c699a40d68215c7e44a5b26117a35c8a56fbd387)
* avoid echo -e, there are systems where it does not workAlex Riesen2006-02-12
| | | | | | | | FreeBSD 4.11 being one example: the built-in echo doesn't have -e, and the installed /bin/echo does not do "-e" as well. "printf" works, laking just "\e" and "\xAB'. Signed-off-by: Junio C Hamano <junkio@cox.net>
* remove CR/LF from .gitignoreAlex Riesen2005-11-02
| | | | | | | | | | | For everyone cursed by dos/windows line endings (aka CRLF): The code reading the .gitignore files (excludes and excludes per directory) leaves \r in the patterns, which causes fnmatch to fail for no obvious reason. Just remove a "\r" preceding a "\n" unconditionally. Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Missing test_donePavel Roskin2005-08-11
| | | | | | | | | | All test scripts should end with test_done, which reports the test results. In the future, it could be used for other purposes, e.g. to distinguish graceful end from "exit" in a test. This patch fixes scripts that don't call test_done. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation and tests: ls-files exclude pattern.Junio C Hamano2005-07-29
| | | | | | | Update the tests and documentation to match the new "last one determines its fate" semantics. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-ls-files: --exclude mechanism updates.Junio C Hamano2005-07-25
Add --exclude-per-directory=<name> option that specifies a file to contain exclude patterns local to that directory and its subdirectories. Update the exclusion logic to be able to say "include files that match this more specific pattern, even though later exclude patterns may match them". Also enhances that a pattern can contain '/' in which case fnmatch is called with FNM_PATHNAME flag to match the entire path. Signed-off-by: Junio C Hamano <junkio@cox.net>