All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Adam Spiers" <git@adamspiers.org>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: nd/attr-match-more-optim, nd/wildmatch and as/check-ignore
Date: Mon, 15 Oct 2012 13:23:32 +0700	[thread overview]
Message-ID: <1350282212-4270-1-git-send-email-pclouds@gmail.com> (raw)

I promise I won't send anything dir.c-related till the end of this
month :) These three series all touch the same code in dir.c and cause
a bunch of conflicts. So I rebase nd/wildmatch and as/check-ignore
on top of nd/attr-match-more-optim and resolve all conflicts.

nd/attr-match-more-optim
------------------------

A lot of refactoring in dir.c leads to a cleaner last patch to port
many exclude optimizations to attr. We can extend EXC_FLAGS_ENDSWITH
optimization further, from "^*.[ch]" to "path/to/*.[ch]", but not in
this series.

Nguyễn Thái Ngọc Duy (6):
  exclude: stricten a length check in EXC_FLAG_ENDSWITH case
  exclude: split basename matching code into a separate function
  exclude: fix a bug in prefix compare optimization
  exclude: split pathname matching code into a separate function
  gitignore: make pattern parsing code a separate function
  attr: more matching optimizations from .gitignore

 Documentation/gitattributes.txt    |   1 +
 attr.c                             |  52 ++++++----
 dir.c                              | 192 ++++++++++++++++++++++++-------------
 dir.h                              |  13 ++-
 t/t0003-attributes.sh              |  10 ++
 t/t3001-ls-files-others-exclude.sh |   6 ++
 6 files changed, 186 insertions(+), 88 deletions(-)

nd/wildmatch
------------

new ctype patches that no longer introduce sane_ctype2[]. I also
re-indent wildmatch.c to follow Git's coding style with the intention
of making more changes in future (e.g. case insensitive support in
pathspec means we cannot rely on GNU extension FNM_CASEFOLD). Thanks
to nd/attr-match-more-optim we don't need to make any changes to
attr.c.

Depends on nd/attr-match-more-optim.

Nguyễn Thái Ngọc Duy (13):
  ctype: make sane_ctype[] const array
  ctype: support iscntrl, ispunct, isxdigit and isprint
  Import wildmatch from rsync
  wildmatch: remove unnecessary functions
  wildmatch: follow Git's coding convention
  Integrate wildmatch to git
  t3070: disable unreliable fnmatch tests
  wildmatch: make wildmatch's return value compatible with fnmatch
  wildmatch: remove static variable force_lower_case
  wildmatch: fix case-insensitive matching
  wildmatch: adjust "**" behavior
  wildmatch: make /**/ match zero or more directories
  Support "**" wildcard in .gitignore and .gitattributes

 .gitignore                         |   1 +
 Documentation/gitignore.txt        |  19 +++
 Makefile                           |   3 +
 ctype.c                            |  15 ++-
 dir.c                              |   4 +-
 git-compat-util.h                  |  15 ++-
 t/t0003-attributes.sh              |  37 ++++++
 t/t3001-ls-files-others-exclude.sh |  18 +++
 t/t3070-wildmatch.sh               | 195 +++++++++++++++++++++++++++++++
 test-wildmatch.c                   |  14 +++
 wildmatch.c                        | 234 +++++++++++++++++++++++++++++++++++++
 wildmatch.h                        |   9 ++
 12 files changed, 556 insertions(+), 8 deletions(-)
 create mode 100755 t/t3070-wildmatch.sh
 create mode 100644 test-wildmatch.c
 create mode 100644 wildmatch.c
 create mode 100644 wildmatch.h

as/check-ignore
---------------

Conflict resolution and cleanups. A lot of matching code sharing
between exclude and attr means we might be able to bring check-ignore
functionality to check-attr. But let's leave it for now.

Depends on nd/attr-match-more-optim.

Adam Spiers (12):
  dir.c: rename cryptic 'which' variable to more consistent name
  dir.c: rename path_excluded() to is_path_excluded()
  dir.c: rename excluded_from_list() to is_excluded_from_list()
  dir.c: rename excluded() to is_excluded()
  dir.c: refactor is_excluded_from_list()
  dir.c: refactor is_excluded()
  dir.c: refactor is_path_excluded()
  dir.c: keep track of where patterns came from
  dir.c: refactor treat_gitlinks()
  pathspec.c: move reusable code from builtin/add.c
  dir.c: provide free_directory() for reclaiming dir_struct memory
  Add git-check-ignore sub-command

 .gitignore                                        |   1 +
 Documentation/git-check-ignore.txt                |  85 ++++
 Documentation/gitignore.txt                       |   6 +-
 Documentation/technical/api-directory-listing.txt |   2 +
 Makefile                                          |   3 +
 attr.c                                            |   2 +-
 builtin.h                                         |   1 +
 builtin/add.c                                     |  84 +---
 builtin/check-ignore.c                            | 170 +++++++
 builtin/clean.c                                   |   2 +-
 builtin/ls-files.c                                |   5 +-
 command-list.txt                                  |   1 +
 contrib/completion/git-completion.bash            |   1 +
 dir.c                                             | 185 +++++--
 dir.h                                             |  21 +-
 git.c                                             |   1 +
 pathspec.c                                        |  98 ++++
 pathspec.h                                        |   6 +
 t/t0007-ignores.sh                                | 587 ++++++++++++++++++++++
 unpack-trees.c                                    |  10 +-
 20 files changed, 1135 insertions(+), 136 deletions(-)
 create mode 100644 Documentation/git-check-ignore.txt
 create mode 100644 builtin/check-ignore.c
 create mode 100644 pathspec.c
 create mode 100644 pathspec.h
 create mode 100755 t/t0007-ignores.sh
-- 
1.8.0.rc0.29.g1fdd78f

             reply	other threads:[~2012-10-15  6:23 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-15  6:23 Nguyễn Thái Ngọc Duy [this message]
2012-10-15  6:24 ` [PATCH 1/6] exclude: stricten a length check in EXC_FLAG_ENDSWITH case Nguyễn Thái Ngọc Duy
2012-10-15  6:24   ` [PATCH 2/6] exclude: split basename matching code into a separate function Nguyễn Thái Ngọc Duy
2012-10-15  6:24   ` [PATCH 3/6] exclude: fix a bug in prefix compare optimization Nguyễn Thái Ngọc Duy
2012-10-15  6:24   ` [PATCH 4/6] exclude: split pathname matching code into a separate function Nguyễn Thái Ngọc Duy
2012-10-15  6:24   ` [PATCH 5/6] gitignore: make pattern parsing code " Nguyễn Thái Ngọc Duy
2012-10-15  6:24   ` [PATCH 6/6] attr: more matching optimizations from .gitignore Nguyễn Thái Ngọc Duy
2012-10-15  6:25 ` [PATCH 01/13] ctype: make sane_ctype[] const array Nguyễn Thái Ngọc Duy
2012-10-15  6:25   ` [PATCH 02/13] ctype: support iscntrl, ispunct, isxdigit and isprint Nguyễn Thái Ngọc Duy
2012-10-15  6:25   ` [PATCH 03/13] Import wildmatch from rsync Nguyễn Thái Ngọc Duy
2012-10-15  6:25   ` [PATCH 04/13] wildmatch: remove unnecessary functions Nguyễn Thái Ngọc Duy
2012-10-15  6:25   ` [PATCH 05/13] wildmatch: follow Git's coding convention Nguyễn Thái Ngọc Duy
2012-10-15  6:25   ` [PATCH 06/13] Integrate wildmatch to git Nguyễn Thái Ngọc Duy
2012-10-15  6:25   ` [PATCH 07/13] t3070: disable unreliable fnmatch tests Nguyễn Thái Ngọc Duy
2012-10-15  6:25   ` [PATCH 08/13] wildmatch: make wildmatch's return value compatible with fnmatch Nguyễn Thái Ngọc Duy
2012-10-15  6:25   ` [PATCH 09/13] wildmatch: remove static variable force_lower_case Nguyễn Thái Ngọc Duy
2012-10-15  6:25   ` [PATCH 10/13] wildmatch: fix case-insensitive matching Nguyễn Thái Ngọc Duy
2012-10-15  6:26   ` [PATCH 11/13] wildmatch: adjust "**" behavior Nguyễn Thái Ngọc Duy
2012-10-15  6:26   ` [PATCH 12/13] wildmatch: make /**/ match zero or more directories Nguyễn Thái Ngọc Duy
2012-10-15  6:26   ` [PATCH 13/13] Support "**" wildcard in .gitignore and .gitattributes Nguyễn Thái Ngọc Duy
2012-11-04 21:00     ` [PATCH 14/13] wildmatch: fix tests that fail on Windows due to path mangling Johannes Sixt
2012-11-06 12:47       ` Nguyen Thai Ngoc Duy
2012-11-07 19:32         ` Johannes Sixt
2012-11-11 10:13       ` [PATCH 14/13] test-wildmatch: " Nguyễn Thái Ngọc Duy
2012-11-11 10:13         ` [PATCH 15/13] compat/fnmatch: fix off-by-one character class's length check Nguyễn Thái Ngọc Duy
2012-11-13 18:07           ` Johannes Sixt
2012-11-20  7:06           ` Johannes Sixt
2012-11-11 10:47         ` [PATCH 14/13] test-wildmatch: fix tests that fail on Windows due to path mangling Junio C Hamano
2012-11-13 10:06           ` [PATCH 14/13] test-wildmatch: avoid Windows " Nguyễn Thái Ngọc Duy
2012-11-13 18:06             ` Johannes Sixt
2012-11-20  7:02           ` Johannes Sixt
2012-11-20 20:11             ` Junio C Hamano
2012-11-21  6:41               ` Johannes Sixt
2012-10-15  6:27 ` [PATCH 01/12] dir.c: rename cryptic 'which' variable to more consistent name Nguyễn Thái Ngọc Duy
2012-10-15  6:27   ` [PATCH 02/12] dir.c: rename path_excluded() to is_path_excluded() Nguyễn Thái Ngọc Duy
2012-10-15  6:27   ` [PATCH 03/12] dir.c: rename excluded_from_list() to is_excluded_from_list() Nguyễn Thái Ngọc Duy
2012-10-15  6:27   ` [PATCH 04/12] dir.c: rename excluded() to is_excluded() Nguyễn Thái Ngọc Duy
2012-10-15  6:27   ` [PATCH 05/12] dir.c: refactor is_excluded_from_list() Nguyễn Thái Ngọc Duy
2012-10-15  6:28   ` [PATCH 06/12] dir.c: refactor is_excluded() Nguyễn Thái Ngọc Duy
2012-10-15  6:28   ` [PATCH 07/12] dir.c: refactor is_path_excluded() Nguyễn Thái Ngọc Duy
2012-10-15  6:28   ` [PATCH 08/12] dir.c: keep track of where patterns came from Nguyễn Thái Ngọc Duy
2012-10-15  6:28   ` [PATCH 09/12] dir.c: refactor treat_gitlinks() Nguyễn Thái Ngọc Duy
2012-10-15  6:28   ` [PATCH 10/12] pathspec.c: move reusable code from builtin/add.c Nguyễn Thái Ngọc Duy
2012-10-15  6:28   ` [PATCH 11/12] dir.c: provide free_directory() for reclaiming dir_struct memory Nguyễn Thái Ngọc Duy
2012-10-15  6:28   ` [PATCH 12/12] Add git-check-ignore sub-command Nguyễn Thái Ngọc Duy
2012-10-15 22:31     ` Junio C Hamano
2012-10-16 11:08       ` Nguyen Thai Ngoc Duy
2012-10-16 14:09         ` Adam Spiers
2012-10-16 15:07           ` Nguyen Thai Ngoc Duy
2012-10-16 14:13       ` Adam Spiers
2012-10-16 16:12         ` Junio C Hamano
2012-12-17  0:10           ` Adam Spiers
2012-11-04 21:07     ` [PATCH as/check-ignore] t0007: fix tests on Windows Johannes Sixt
2012-11-08 18:04       ` Jeff King
2012-10-15 22:13 ` nd/attr-match-more-optim, nd/wildmatch and as/check-ignore Junio C Hamano

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=1350282212-4270-1-git-send-email-pclouds@gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@adamspiers.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.