[PATCH v4 02/11] dir.c: keep track of where patterns came from

2013-01-06 Thread Adam Spiers
. from the CLI. Signed-off-by: Adam Spiers --- builtin/clean.c| 4 ++-- builtin/ls-files.c | 5 +++-- dir.c | 26 -- dir.h | 21 +++-- 4 files changed, 44 insertions(+), 12 deletions(-) diff --git a/builtin/clean.c b/builtin

[PATCH v4 01/11] dir.c: use a single struct exclude_list per source of excludes

2013-01-06 Thread Adam Spiers
e filebuf member from struct exclude_stack to struct exclude_list, it allows us to track and subsequently free memory buffers allocated during the parsing of all exclude files, rather than only tracking buffers allocated for files in the EXC_DIRS group. Signed-off-by: Adam Spiers --- Docu

[PATCH v4 05/11] add.c: remove unused argument from validate_pathspec()

2013-01-06 Thread Adam Spiers
The 'argc' argument passed to validate_pathspec() was never used. Signed-off-by: Adam Spiers --- builtin/add.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/add.c b/builtin/add.c index c689f37..1f62ba3 100644 --- a/builtin/add.c +++ b/builtin/add.c

[PATCH v4 10/11] setup.c: document get_pathspec()

2013-01-06 Thread Adam Spiers
Since we have just created a new pathspec-handling library, now is a good time to add some comments explaining get_pathspec(). Signed-off-by: Adam Spiers --- The deprecation warning is new since v3. setup.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/setup.c b

[PATCH v4 11/11] add git-check-ignore sub-command

2013-01-06 Thread Adam Spiers
This works in a similar manner to git-check-attr. Thanks to Jeff King and Junio C Hamano for the idea: http://thread.gmane.org/gmane.comp.version-control.git/108671/focus=108815 Signed-off-by: Adam Spiers --- Several minor improvements since v3: - rename char *dir to slash - fix some

[PATCH v4 09/11] add.c: extract new die_if_path_beyond_symlink() for reuse

2013-01-06 Thread Adam Spiers
This will be reused by a new git check-ignore command. Also document validate_pathspec(). Signed-off-by: Adam Spiers --- Unlike v3, this series doesn't make validate_pathspec() public. builtin/add.c | 10 ++ pathspec.c| 12 pathspec.h| 1 + 3 files change

[PATCH v4 08/11] add.c: extract check_path_for_gitlink() from treat_gitlinks() for reuse

2013-01-06 Thread Adam Spiers
Extract the body of the for loop in treat_gitlinks() into a separate check_path_for_gitlink() function so that it can be reused elsewhere. This paves the way for a new check-ignore sub-command. Also document treat_gitlinks(). Signed-off-by: Adam Spiers --- Unlike v3, this series doesn't

[PATCH v4 07/11] pathspec.c: rename newly public functions for clarity

2013-01-06 Thread Adam Spiers
pec() -> find_pathspecs_matching_against_index() Signed-off-by: Adam Spiers --- builtin/add.c | 4 ++-- pathspec.c| 17 + pathspec.h| 4 ++-- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/builtin/add.c b/builtin/add.c index e51ba44..8c3fdf9 100644 --- a/builtin/add.c

[PATCH v4 06/11] add.c: move pathspec matchers into new pathspec.c for reuse

2013-01-06 Thread Adam Spiers
Also add comments documenting these newly public functions, including clarifications that they operate on the index. Signed-off-by: Adam Spiers --- The v3 version of this patch extracted 5 functions from add.c to pathspec.c, two of which did not need to be extracted. Here we use more fine-grained c

Re: [PATCH] api-allocation-growing.txt: encourage better variable naming

2013-01-06 Thread Adam Spiers
On Sun, Jan 06, 2013 at 12:29:33PM -0800, Junio C Hamano wrote: > Adam Spiers writes: > > > The documentation for the ALLOC_GROW API implicitly encouraged > > developers to use "ary" as the variable name for the array which is > > dynamically grown. Howeve

Re: [PATCH v3 11/19] dir.c: use a single struct exclude_list per source of excludes

2013-01-06 Thread Adam Spiers
On Sun, Jan 06, 2013 at 12:25:48PM -0800, Junio C Hamano wrote: > Adam Spiers writes: > > > On Fri, Jan 04, 2013 at 01:03:59PM -0800, Junio C Hamano wrote: > >> Adam Spiers writes: > >> > >> > diff --git a/builtin/clean.c b/builtin/clean.c > &g

Re: [PATCH v3 11/19] dir.c: use a single struct exclude_list per source of excludes

2013-01-06 Thread Adam Spiers
On Sun, Jan 06, 2013 at 10:53:11PM +, Adam Spiers wrote: > That's a valid point. However, the ary[0] part which assumes external > knowledge of the internal implementation can trivially be avoided by > squashing this patch onto the commit we are discussing: [snipped] > dif

Re: [PATCH] t0008: avoid brace expansion

2013-01-09 Thread Adam Spiers
On Wed, Jan 9, 2013 at 11:49 PM, René Scharfe wrote: > Brace expansion is not required by POSIX and not supported by dash nor > NetBSD's sh. Explicitly list all combinations instead. Good catch, thanks! -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to

Re: [PATCH] t0008: avoid brace expansion

2013-01-09 Thread Adam Spiers
On Thu, Jan 10, 2013 at 12:18 AM, Junio C Hamano wrote: > Adam Spiers writes: > >> On Wed, Jan 9, 2013 at 11:49 PM, René Scharfe >> wrote: >>> Brace expansion is not required by POSIX and not supported by dash nor >>> NetBSD's sh. Explicitly list a

Re: What's cooking in git.git (Jan 2013, #06; Mon, 14)

2013-01-15 Thread Adam Spiers
On Mon, Jan 14, 2013 at 10:23 PM, Junio C Hamano wrote: > * as/check-ignore (2013-01-10) 12 commits > (merged to 'next' on 2013-01-14 at 9df2afc) > + t0008: avoid brace expansion > + add git-check-ignore sub-command > + setup.c: document get_pathspec() > + add.c: extract new die_if_path_beyo

Re: What's cooking in git.git (Jan 2013, #06; Mon, 14)

2013-01-16 Thread Adam Spiers
On Wed, Jan 16, 2013 at 2:37 AM, Junio C Hamano wrote: > Adam Spiers writes: > >> On Mon, Jan 14, 2013 at 10:23 PM, Junio C Hamano wrote: >>> * as/check-ignore (2013-01-10) 12 commits >>> (merged to 'next' on 2013-01-14 at 9df2afc) >>> +

[PATCH] clean.c, ls-files.c: respect encapsulation of exclude_list_groups

2013-01-16 Thread Adam Spiers
dir.exclude_list_groups[EXC_CMDL]. Signed-off-by: Adam Spiers --- builtin/clean.c| 6 +++--- builtin/ls-files.c | 15 ++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/builtin/clean.c b/builtin/clean.c index b098288..b9cb7ad 100644 --- a/builtin/clean.c +++ b/builtin

RFC: two minor tweaks to check-ignore to help git-annex assistant

2013-04-08 Thread Adam Spiers
ng check-ignore process, and for each of these files, STDOUT will indicate whether that file matched a pattern or not. (Without this option, it would be impossible to tell whether the absence of output for a given file meant that it didn't match any pattern, or that the output hadn't bee

[PATCH 1/5] check-ignore: move setup into cmd_check_ignore()

2013-04-10 Thread Adam Spiers
: Adam Spiers --- builtin/check-ignore.c | 39 --- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c index 0240f99..0a4eef1 100644 --- a/builtin/check-ignore.c +++ b/builtin/check-ignore.c @@ -53,30

[PATCH 3/5] Documentation: add caveats about I/O buffering for check-{attr,ignore}

2013-04-10 Thread Adam Spiers
. Somebody has to buffer; the pipe buffers provide some leeway, but they are limited. Thanks to Peff for pointing this out: http://article.gmane.org/gmane.comp.version-control.git/220534 Signed-off-by: Adam Spiers --- Documentation/git-check-attr.txt | 5 + Documentation/git-check

[PATCH 2/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-10 Thread Adam Spiers
he existing pathspec API. Signed-off-by: Adam Spiers --- builtin/check-ignore.c | 16 ++-- t/t0008-ignores.sh | 29 - 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c index 0a4eef1..ce4b1ad

[PATCH 5/5] check-ignore: add -n / --non-matching option

2013-04-10 Thread Adam Spiers
ned-off-by: Adam Spiers --- Documentation/git-check-ignore.txt | 15 + builtin/check-ignore.c | 46 -- t/t0008-ignores.sh | 122 +++-- 3 files changed, 134 insertions(+), 49 deletions(-) diff --git a/Documentation

[PATCH 4/5] t0008: remove duplicated test fixture data

2013-04-10 Thread Adam Spiers
The expected contents of STDOUT for the final --stdin tests can be derived from the expected contents of STDOUT for the same tests when --verbose is given, in the same way that test_expect_success_multi derives this for earlier tests. Signed-off-by: Adam Spiers --- t/t0008-ignores.sh | 16

[PATCH] t: make PIPE a standard test prerequisite

2013-04-10 Thread Adam Spiers
The 'PIPE' test prerequisite was already defined identically by t9010 and t9300, therefore it makes sense to make it a predefined prerequisite. Signed-off-by: Adam Spiers --- My first attempt at writing a test for check-ignore's new streaming behaviour involved mkfifo, during

Re: [PATCH 2/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-11 Thread Adam Spiers
On Thu, Apr 11, 2013 at 01:31:45AM -0400, Jeff King wrote: > On Thu, Apr 11, 2013 at 02:59:32AM +0100, Adam Spiers wrote: > > > @@ -111,14 +110,11 @@ static int check_ignore_stdin_paths(struct > > path_exclude_check check, const char > > d

Re: [PATCH 1/5] check-ignore: move setup into cmd_check_ignore()

2013-04-11 Thread Adam Spiers
On Thu, Apr 11, 2013 at 01:25:53AM -0400, Jeff King wrote: > On Thu, Apr 11, 2013 at 02:59:31AM +0100, Adam Spiers wrote: > > -static int check_ignore(const char *prefix, const char **pathspec) > > +static int check_ignore(struct path_exclude_check check, > > +

Re: [PATCH 2/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-11 Thread Adam Spiers
On Thu, Apr 11, 2013 at 02:59:32AM +0100, Adam Spiers wrote: > +test_expect_success STDBUF 'streaming support for --stdin' ' > + ( > + echo one > + sleep 2 > + echo two > + ) | stdbuf -oL git check-ignore -v -n --stdin

[PATCH v2 1/5] t0008: remove duplicated test fixture data

2013-04-11 Thread Adam Spiers
The expected contents of STDOUT for the final --stdin tests can be derived from the expected contents of STDOUT for the same tests when --verbose is given, in the same way that test_expect_success_multi derives this for earlier tests. Signed-off-by: Adam Spiers --- t/t0008-ignores.sh | 16

[PATCH v2 3/5] check-ignore: move setup into cmd_check_ignore()

2013-04-11 Thread Adam Spiers
: Adam Spiers --- builtin/check-ignore.c | 41 + 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c index 59acf74..e2d3006 100644 --- a/builtin/check-ignore.c +++ b/builtin/check-ignore.c @@ -63,30

[PATCH v2 2/5] check-ignore: add -n / --non-matching option

2013-04-11 Thread Adam Spiers
ned-off-by: Adam Spiers --- Documentation/git-check-ignore.txt | 15 + builtin/check-ignore.c | 46 -- t/t0008-ignores.sh | 122 +++-- 3 files changed, 134 insertions(+), 49 deletions(-) diff --git a/Documentation

[PATCH v2 4/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-11 Thread Adam Spiers
he existing pathspec API. Signed-off-by: Adam Spiers --- builtin/check-ignore.c | 15 +-- t/t0008-ignores.sh | 28 +++- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c index e2d3006..c00a7d6

[PATCH v2 5/5] Documentation: add caveats about I/O buffering for check-{attr,ignore}

2013-04-11 Thread Adam Spiers
. Somebody has to buffer; the pipe buffers provide some leeway, but they are limited. Thanks to Peff for pointing this out: http://article.gmane.org/gmane.comp.version-control.git/220534 Signed-off-by: Adam Spiers --- Documentation/git-check-attr.txt | 5 + Documentation/git-check

[PATCH v3 5/5] Documentation: add caveats about I/O buffering for check-{attr,ignore}

2013-04-11 Thread Adam Spiers
pipe buffers provide some leeway, but they are limited. Thanks to Peff for pointing this out: http://article.gmane.org/gmane.comp.version-control.git/220534 Signed-off-by: Adam Spiers --- Documentation/git-check-attr.txt | 5 + Documentation/git-check-ignore.txt | 5 + Docume

Re: [PATCH v2 4/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-11 Thread Adam Spiers
On Thu, Apr 11, 2013 at 03:11:32PM -0400, Jeff King wrote: > I always get a little nervous with sleeps in the test suite, as they are > indicative that we are trying to avoid some race condition, which means > that the test can fail when the system is under load, or when a tool > like valgrind is u

Re: [PATCH v2 4/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-11 Thread Adam Spiers
On Thu, Apr 11, 2013 at 05:04:30PM -0400, Aaron Schrab wrote: > At 13:05 +0100 11 Apr 2013, Adam Spiers wrote: > >The above use case suggests that empty STDIN is actually a reasonable > >scenario (e.g. when the caller doesn't know in advance whether any > >queries need t

Re: [PATCH v3 5/5] Documentation: add caveats about I/O buffering for check-{attr,ignore}

2013-04-12 Thread Adam Spiers
On Thu, Apr 11, 2013 at 07:12:22PM -0700, Junio C Hamano wrote: > It is usually OK to re-flow the text in the paragraph you are > touching. After all, for the purpose of reviewing, people can just > blindly apply and then ask "diff --color-words". In this case, > however, there was some changes th

Re: [PATCH v1 23/45] check-ignore: convert to use parse_pathspec

2013-04-12 Thread Adam Spiers
On Fri, Mar 15, 2013 at 01:06:38PM +0700, Nguyễn Thái Ngọc Duy wrote: > check-ignore (at least the test suite) seems to rely on the pattern > order. PATHSPEC_KEEP_ORDER is introduced to explictly express this. > The lack of PATHSPEC_MAXDEPTH_VALID is sufficient because it's the > only flag that reo

Re: [PATCH v1 23/45] check-ignore: convert to use parse_pathspec

2013-04-14 Thread Adam Spiers
On Sat, Apr 13, 2013 at 09:09:33AM +1000, Duy Nguyen wrote: > On Sat, Apr 13, 2013 at 1:03 AM, Adam Spiers wrote: > >> -static int check_ignore(const char *prefix, const char **pathspec) > >> +static int check_ignore(int argc, const char **argv, const char *prefix) >

Re: [PATCH v1 23/45] check-ignore: convert to use parse_pathspec

2013-04-15 Thread Adam Spiers
On Mon, Apr 15, 2013 at 09:48:22AM +1000, Duy Nguyen wrote: > On Mon, Apr 15, 2013 at 9:25 AM, Adam Spiers wrote: > >> > The introduction of argc also makes it possible to invoke > >> > check_ignore() with arguments which are not self-consistent. > >> >

Re: [PATCH v2 4/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-24 Thread Adam Spiers
On Mon, Apr 22, 2013 at 11:03:44AM -0700, Junio C Hamano wrote: > Adam Spiers writes: > > > On Thu, Apr 11, 2013 at 03:11:32PM -0400, Jeff King wrote: > >> I always get a little nervous with sleeps in the test suite, as they are > >> indicative that we are tryin

git-icing: sugary wrapper around git-cherry

2013-04-27 Thread Adam Spiers
Hi all, I just wrote a wrapper around git cherry which adds a splash of colour, and facilitates exclusion of commits which should never be upstreamed, by using a git-notes(1) namespace as a blacklist. It's just a quick hack and Ruby probably won't be to everyone's taste, but I thought I'd mention

git-rnotes: git-notes wrapper for sharing notes between repositories

2013-04-29 Thread Adam Spiers
On Sat, Apr 27, 2013 at 02:21:19PM +0100, Adam Spiers wrote: > Hi all, > > I just wrote a wrapper around git cherry which adds a splash of > colour, and facilitates exclusion of commits which should never be > upstreamed, by using a git-notes(1) namespace as a blacklist. > &

improvements to checks for core.notesRef / GIT_NOTES_REF / --ref

2013-04-29 Thread Adam Spiers
On Mon, Apr 29, 2013 at 02:32:05PM +0100, Adam Spiers wrote: > I've just written another quick wrapper around 'git notes' which makes > it less painless to share notes to and from remote repositories: > > https://github.com/aspiers/git-config/blob/master/bin/git-rno

Re: improvements to checks for core.notesRef / GIT_NOTES_REF / --ref

2013-04-29 Thread Adam Spiers
On Mon, Apr 29, 2013 at 10:13:32AM -0700, Junio C Hamano wrote: > Adam Spiers writes: > > > static struct notes_tree *init_notes_check(const char *subcommand) > > ... > > Can we relax this to "refs/", to allow better isolation of namespaces > &g

[PATCH] t0008: use named pipe (FIFO) to test check-ignore streaming

2013-04-29 Thread Adam Spiers
the redirection wizardry required to make this work. http://article.gmane.org/gmane.comp.version-control.git/220916 Signed-off-by: Adam Spiers --- t/t0008-ignores.sh | 38 +- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/t/t0008-ignores.sh b

Re: improvements to checks for core.notesRef / GIT_NOTES_REF / --ref

2013-04-29 Thread Adam Spiers
On Tue, Apr 30, 2013 at 02:32:33AM +0200, Johan Herland wrote: > On Mon, Apr 29, 2013 at 11:40 PM, Adam Spiers wrote: [snipped] > > IMHO the more similar the merge's user experience is to a standard > > merge, the better, since that would minimise the number of merging &g

[PATCH 3/9] Rename cryptic 'which' variable to more consistent name

2012-09-01 Thread Adam Spiers
'el' is only *slightly* less cryptic, but is already used as the variable name for a struct exclude_list pointer in numerous other places, so this reduces the number of cryptic variable names in use by one :-) Signed-off-by: Adam Spiers --- dir.c | 10 +- dir.h | 4 ++-

[PATCH 7/9] Extract some useful pathspec handling code from builtin/add.c into a library

2012-09-01 Thread Adam Spiers
This is in preparation for reuse by a new git check-ignore command. Signed-off-by: Adam Spiers --- Makefile | 2 ++ builtin/add.c | 82 +++ pathspec.c| 87 +++ pathspec.h

[PATCH 6/9] For each exclude pattern, store information about where it came from

2012-09-01 Thread Adam Spiers
--exclude would be numbered -2. This allows any future consumers of that data to easily distinguish between exclude patterns from files vs. from the CLI. Signed-off-by: Adam Spiers --- builtin/clean.c| 2 +- builtin/ls-files.c | 3 ++- dir.c | 25 +++-- dir.h

[PATCH 8/9] Provide free_directory() for reclaiming dir_struct memory

2012-09-01 Thread Adam Spiers
Signed-off-by: Adam Spiers --- Documentation/technical/api-directory-listing.txt | 2 ++ dir.c | 23 +-- dir.h | 1 + 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a

[PATCH 4/9] Refactor excluded_from_list

2012-09-01 Thread Adam Spiers
pass out the entire exclude match, which contains the status information we were already passing out. Further patches can make use of this. This is a modified forward port of a patch from 2009 by Jeff King: http://article.gmane.org/gmane.comp.version-control.git/108815 Signed-off-by: Adam S

[PATCH 5/9] Refactor excluded and path_excluded

2012-09-01 Thread Adam Spiers
whether any matching exclude_list element was found. This allows callers to find out _why_ a given path was excluded, rather than just whether it was or not, paving the way for a new git sub-command which allows users to test their exclude lists from the command line. Signed-off-by: Adam Spiers

[PATCH 0/9] new git check-ignore sub-command

2012-09-01 Thread Adam Spiers
ed about why files are/aren't being ignored). It's also because this whole project took a lot longer than I expected, so I'm running out of time :-) Perhaps someone can add this in the future if it's needed. Right now the cache is only used to prevent recursing into submodules. Th

[PATCH 9/9] Add git-check-ignores

2012-09-01 Thread Adam Spiers
This works in a similar manner to git-check-attr. Some code was reused from add.c by refactoring out into pathspec.c. Thanks to Jeff King and Junio C Hamano for the idea: http://thread.gmane.org/gmane.comp.version-control.git/108671/focus=108815 Signed-off-by: Adam Spiers --- .gitignore

[PATCH 1/9] Update directory listing API doc to match code

2012-09-01 Thread Adam Spiers
7c4c97c0ac turned the flags in struct dir_struct into a single bitfield variable, but forgot to update this document. Signed-off-by: Adam Spiers --- Documentation/technical/api-directory-listing.txt | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation

[PATCH 2/9] Improve documentation and comments regarding directory traversal API

2012-09-01 Thread Adam Spiers
Signed-off-by: Adam Spiers --- Documentation/technical/api-directory-listing.txt | 9 +--- dir.c | 8 ++- dir.h | 26 +-- 3 files changed, 37 insertions(+), 6 deletions(-) diff

Re: [PATCH 9/9] Add git-check-ignores

2012-09-02 Thread Adam Spiers
Hi there, Firstly, thanks for the quick feedback! On Sun, Sep 2, 2012 at 11:41 AM, Nguyen Thai Ngoc Duy wrote: > On Sun, Sep 2, 2012 at 7:12 AM, Adam Spiers wrote: >> This works in a similar manner to git-check-attr. Some code >> was reused from add.c by refactoring out

Re: [PATCH 5/9] Refactor excluded and path_excluded

2012-09-06 Thread Adam Spiers
On Thu, Sep 6, 2012 at 4:05 PM, Nguyen Thai Ngoc Duy wrote: > On Thu, Sep 6, 2012 at 9:59 PM, Thiago Farina wrote: >> On Thu, Sep 6, 2012 at 9:13 AM, Nguyen Thai Ngoc Duy >> wrote: >>> On Thu, Sep 6, 2012 at 10:21 AM, Junio C Hamano wrote: Nguyen Thai Ngoc Duy writes: > We could

Re: [PATCH 0/9] new git check-ignore sub-command

2012-09-06 Thread Adam Spiers
On Sun, Sep 2, 2012 at 9:35 PM, Junio C Hamano wrote: > Adam Spiers writes: > >> I was browsing stackoverflow the other day and came across this question: >> >> >> http://stackoverflow.com/questions/12144633/which-gitignore-rule-is-ignoring-my-file/ >> &g

Re: [PATCH 6/9] For each exclude pattern, store information about where it came from

2012-09-06 Thread Adam Spiers
On Sun, Sep 2, 2012 at 11:36 PM, Philip Oakley wrote: > From: "Junio C Hamano" > Sent: Sunday, September 02, 2012 8:02 PM >> "Philip Oakley" writes: >>> Is there a way to identify the config core.excludesfile if present? >>> i.e. that it is from that config variable, rather than directory >>> tr

Re: [PATCH 0/9] new git check-ignore sub-command

2012-09-07 Thread Adam Spiers
On Sun, Sep 2, 2012 at 9:35 PM, Junio C Hamano wrote: > * avoid unnnecessary braces {} around single statement blocks, e.g. > > -if (exclude) { > +if (exclude) > return exclude; > -} > > * else should follow close brace '}' of if clause, e.g. > > if (...) { > ..

Re: [PATCH 9/9] Add git-check-ignores

2012-09-10 Thread Adam Spiers
On Tue, Sep 04, 2012 at 08:06:12PM +0700, Nguyen Thai Ngoc Duy wrote: > On Sun, Sep 2, 2012 at 7:12 AM, Adam Spiers wrote: > > --- a/builtin/add.c > > +++ b/builtin/add.c > > @@ -273,7 +273,7 @@ static int add_files(struct dir_struct *dir, int flags) > >

Re: [PATCH 9/9] Add git-check-ignores

2012-09-10 Thread Adam Spiers
On Wed, Sep 05, 2012 at 05:25:25PM +0700, Nguyen Thai Ngoc Duy wrote: > On Wed, Sep 5, 2012 at 12:26 AM, Junio C Hamano wrote: > > Nguyen Thai Ngoc Duy writes: > > > >>> +static void output_exclude(const char *path, struct exclude *exclude) > >>> +{ > >>> + char *type = exclude->to_exclude

[PATCH] Add missing -z to git check-attr usage text for consistency with man page

2012-09-17 Thread Adam Spiers
Signed-off-by: Adam Spiers --- builtin/check-attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/check-attr.c b/builtin/check-attr.c index e1ff575..075d01d 100644 --- a/builtin/check-attr.c +++ b/builtin/check-attr.c @@ -9,7 +9,7 @@ static int cached_attrs; static

[PATCH] Make test output coloring more intuitive

2012-09-17 Thread Adam Spiers
: test failures, unexpected test passes, and failures with the framework, - yellow is _only_ used for known breakages, and - green is _only_ used for things which have gone to plan and require no further work to be done. Signed-off-by: Adam Spiers --- t/t-basic.sh | 7 -

Re: [PATCH] Make test output coloring more intuitive

2012-09-18 Thread Adam Spiers
On Mon, Sep 17, 2012 at 04:11:19PM -0400, Jeff King wrote: > On Mon, Sep 17, 2012 at 12:50:37PM +0100, Adam Spiers wrote: > > > The end result of these changes is that: > > > > - red is _only_ used for things which have gone unexpectedly wrong: > > test fa

Re: [PATCH] Make test output coloring more intuitive

2012-09-18 Thread Adam Spiers
On Mon, Sep 17, 2012 at 01:50:39PM -0700, Junio C Hamano wrote: > Adam Spiers writes: > > > 1. Change the color of individual known breakages from bold green to > >bold yellow. This seems more appropriate when considering the > >universal traffic lights colo

Re: [PATCH] Make test output coloring more intuitive

2012-09-18 Thread Adam Spiers
On Tue, Sep 18, 2012 at 10:59 PM, Jeff King wrote: > TODO is a special token[1] respected by TAP harnesses like "prove". I'm > not sure what practical impact it has, but it should probably remain. > > -Peff > > [1] http://testanything.org/wiki/index.php/TAP_specification#TODO_tests Thanks, I didn

[PATCH v2 0/6] make test output coloring more intuitive

2012-09-19 Thread Adam Spiers
tests, and - green is _only_ used for things which have gone to plan and require no further work to be done. Adam Spiers (6): Change the color of individual known breakages Make 'not ok $count - $message' consistent with 'ok $count - $message' Color skipp

[PATCH v2 1/6] Change the color of individual known breakages

2012-09-19 Thread Adam Spiers
r of known breakages from bold red to bold yellow to be less alarmist and more consistent with the above. Signed-off-by: Adam Spiers --- t/test-lib.sh | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index f8e3733..426820e 100644 --- a/t/test-lib.

[PATCH v2 4/6] Refactor mechanics of testing in a sub test-lib

2012-09-19 Thread Adam Spiers
This will allow us to test the test framework more thoroughly without disrupting the top-level test metrics. Signed-off-by: Adam Spiers --- t/t-basic.sh | 44 +++- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/t/t-basic.sh b/t

[PATCH v2 6/6] Treat unexpectedly fixed known breakages more seriously

2012-09-19 Thread Adam Spiers
a pass in the output. Signed-off-by: Adam Spiers --- t/t-basic.sh | 29 +++-- t/test-lib.sh| 13 + 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/t/t-basic.sh b/t/t-basic.sh index 644cc2c..459d0c7 100755 --- a/t/t-basic.sh

[PATCH v2 2/6] Make 'not ok $count - $message' consistent with 'ok $count - $message'

2012-09-19 Thread Adam Spiers
Signed-off-by: Adam Spiers --- t/t-basic.sh | 4 ++-- t/test-lib.sh| 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 t/test-lib.sh diff --git a/t/t-basic.sh b/t/t-basic.sh index ae6a3f0..c6b42de 100755 --- a/t/t-basic.sh +++ b/t/t0

[PATCH v2 3/6] Color skipped tests the same as informational messages

2012-09-19 Thread Adam Spiers
ary, so we leave it non-bold in order to contrast with warnings. Signed-off-by: Adam Spiers --- t/test-lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index 5293830..7028ba8 100755 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -182,13 +182,

[PATCH v2 5/6] Test the test framework more thoroughly

2012-09-19 Thread Adam Spiers
: Adam Spiers --- t/t-basic.sh | 110 +++ 1 file changed, 110 insertions(+) diff --git a/t/t-basic.sh b/t/t-basic.sh index 662cd2f..644cc2c 100755 --- a/t/t-basic.sh +++ b/t/t-basic.sh @@ -77,6 +77,15 @@ run_sub_test_lib_test

Re: [PATCH v2 4/6] Refactor mechanics of testing in a sub test-lib

2012-09-19 Thread Adam Spiers
On Wed, Sep 19, 2012 at 01:56:55PM -0400, Jeff King wrote: > On Wed, Sep 19, 2012 at 06:15:13PM +0100, Adam Spiers wrote: > > > This will allow us to test the test framework more thoroughly > > without disrupting the top-level test metrics. > > I see this is prep for

[PATCH v3 4/6] Refactor mechanics of testing in a sub test-lib

2012-09-19 Thread Adam Spiers
This will allow us to test the test framework more thoroughly without disrupting the top-level test metrics. Signed-off-by: Adam Spiers --- t/t-basic.sh | 67 1 file changed, 29 insertions(+), 38 deletions(-) diff --git a/t/t

[PATCH v3 5/6] Test the test framework more thoroughly

2012-09-19 Thread Adam Spiers
: Adam Spiers --- t/t-basic.sh | 104 +++ 1 file changed, 104 insertions(+) diff --git a/t/t-basic.sh b/t/t-basic.sh index 029e3bd..65f578f 100755 --- a/t/t-basic.sh +++ b/t/t-basic.sh @@ -85,6 +85,55 @@ check_sub_test_lib_test

[PATCH v3 6/6] Treat unexpectedly fixed known breakages more seriously

2012-09-19 Thread Adam Spiers
a pass in the output. Signed-off-by: Adam Spiers --- t/t-basic.sh | 30 -- t/test-lib.sh| 13 + 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/t/t-basic.sh b/t/t-basic.sh index 65f578f..ed44f7d 100755 --- a/t/t

[PATCH] Document conventions on static initialization and else cuddling

2012-09-19 Thread Adam Spiers
Signed-off-by: Adam Spiers --- I have begun work on fixing existing code to adhere to these guidelines on braces, but there are currently a lot of violations, which means any patches to fix them would be large. So before I spend any more time on it, I would like to check whether such patches

Re: [PATCH] Make test output coloring more intuitive

2012-09-19 Thread Adam Spiers
On Wed, Sep 19, 2012 at 10:02:52PM +0200, Stefano Lattarini wrote: > On 09/17/2012 10:11 PM, Jeff King wrote: > > On Mon, Sep 17, 2012 at 12:50:37PM +0100, Adam Spiers wrote: > > > >> The end result of these changes is that: > >> > >> - red is _only_ us

Re: [PATCH v2 4/6] Refactor mechanics of testing in a sub test-lib

2012-09-19 Thread Adam Spiers
On Wed, Sep 19, 2012 at 03:37:08PM -0400, Jeff King wrote: > Looking at it again, it is actually quite subtle what is going on. We > wrap the outer test_expect_* calls in double-quotes so that the inner > ones can use single-quotes easily. But that means that technically the > contents of the here-

[PATCH v4 3/6] Color skipped tests blue

2012-09-19 Thread Adam Spiers
ionary, so instead we use blue which is a universal color for information signs. Signed-off-by: Adam Spiers --- t/test-lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index 5293830..78c88c2 100755 --- a/t/test-lib.sh +++ b/t/test-lib.sh

Re: [PATCH] Document conventions on static initialization and else cuddling

2012-09-19 Thread Adam Spiers
On Wed, Sep 19, 2012 at 01:43:46PM -0700, Junio C Hamano wrote: > Adam Spiers writes: > > > Signed-off-by: Adam Spiers > > --- > > > > I have begun work on fixing existing code to adhere to these > > guidelines on braces, but there are currently a lot of vio

[PATCH] Improve legibility of test_expect_code output

2012-09-19 Thread Adam Spiers
--- t/test-lib-functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 t/test-lib-functions.sh diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh old mode 100644 new mode 100755 index 8889ba5..e022e73 --- a/t/test-lib-functions.sh +++ b/t/test-

Re: [PATCH v2 2/6] Make 'not ok $count - $message' consistent with 'ok $count - $message'

2012-09-19 Thread Adam Spiers
On Thu, Sep 20, 2012 at 12:39 AM, Junio C Hamano wrote: > Adam Spiers writes: > >> Signed-off-by: Adam Spiers >> --- >> t/t-basic.sh | 4 ++-- >> t/test-lib.sh| 2 +- >> 2 files changed, 3 insertions(+), 3 deletions(-) > >> mode change

Re: [PATCH] Improve legibility of test_expect_code output

2012-09-19 Thread Adam Spiers
On Thu, Sep 20, 2012 at 1:06 AM, Junio C Hamano wrote: > Adam Spiers writes: > >> --- > > No explanation why this is a good idea, nor sign-off? I realised I forgot the sign-off seconds after sending :-( Isn't it completely self-explanatory? e.g. test_expect_code: co

Re: [PATCH] Improve legibility of test_expect_code output

2012-09-19 Thread Adam Spiers
On Thu, Sep 20, 2012 at 1:35 AM, Junio C Hamano wrote: > If it were "..., we wanted 128 from 'git foo bar'", then I would, > but otherwise, not really. That's fine by me. Both are better than the status quo. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a messa

Re: [PATCH v4 3/6] Color skipped tests blue

2012-09-20 Thread Adam Spiers
On Thu, Sep 20, 2012 at 6:48 AM, Johannes Sixt wrote: > Am 9/19/2012 22:24, schrieb Adam Spiers: >> skip) >> - tput bold; tput setaf 2;; # bold green >> + tput setaf 4;;# blue > > It's unreadable o

[PATCH v5 3/3] Color skipped tests bold blue

2012-09-20 Thread Adam Spiers
ionary, so instead we use blue which is a universal color for information signs. Bold blue should work better on both black and white backgrounds than normal blue. Signed-off-by: Adam Spiers --- t/test-lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/test-lib.sh b/t/t

Re: [PATCH] Improve legibility of test_expect_code output

2012-09-20 Thread Adam Spiers
On Thu, Sep 20, 2012 at 5:50 PM, Junio C Hamano wrote: > Do you want this queued on top of your other series, or as an > independent change? Independent please. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo i

Re: [PATCH] Improve legibility of test_expect_code output

2012-09-20 Thread Adam Spiers
On Thu, Sep 20, 2012 at 6:45 PM, Junio C Hamano wrote: > Adam Spiers writes: >> On Thu, Sep 20, 2012 at 5:50 PM, Junio C Hamano wrote: >>> Do you want this queued on top of your other series, or as an >>> independent change? >> >> Independent please. >

[PATCH v2 01/14] Update directory listing API doc to match code

2012-09-20 Thread Adam Spiers
7c4c97c0ac turned the flags in struct dir_struct into a single bitfield variable, but forgot to update this document. Signed-off-by: Adam Spiers --- Documentation/technical/api-directory-listing.txt | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation

[PATCH v2 00/14] new git check-ignore sub-command

2012-09-20 Thread Adam Spiers
on the latest master, and passed a full test run. Adam Spiers (14): Update directory listing API doc to match code Improve documentation and comments regarding directory traversal API Rename cryptic 'which' variable to more consistent name Rename path_excluded() to is_path_excluded

[PATCH v2 05/14] Rename excluded_from_list() to is_excluded_from_list()

2012-09-20 Thread Adam Spiers
Continue adopting clearer names for exclude functions. This 'is_*' naming pattern for functions returning booleans was discussed here: http://thread.gmane.org/gmane.comp.version-control.git/204661/focus=204924 Signed-off-by: Adam Spiers --- dir.c | 11 ++- dir.h

[PATCH v2 06/14] Rename excluded() to is_excluded()

2012-09-20 Thread Adam Spiers
Continue adopting clearer names for exclude functions. This is_* naming pattern for functions returning booleans was discussed here: http://thread.gmane.org/gmane.comp.version-control.git/204661/focus=204924 Signed-off-by: Adam Spiers --- attr.c | 2 +- dir.c | 10 +- dir.h | 4

[PATCH v2 07/14] Refactor is_excluded_from_list()

2012-09-20 Thread Adam Spiers
. So let's pass out the entire exclude match, which contains the status information we were already passing out. Further patches can make use of this. This is a modified forward port of a patch from 2009 by Jeff King: http://article.gmane.org/gmane.comp.version-control.git/108815 Signed-off-by:

[PATCH v2 09/14] Refactor is_path_excluded()

2012-09-20 Thread Adam Spiers
matching exclude_list element was found. This allows callers to find out _why_ a given path was excluded, rather than just whether it was or not, paving the way for a new git sub-command which allows users to test their exclude lists from the command line. Signed-off-by: Adam Spiers --- dir.c | 47

[PATCH v2 08/14] Refactor is_excluded()

2012-09-20 Thread Adam Spiers
exclude_list element was found. This allows callers to find out _why_ a given path was excluded, rather than just whether it was or not, paving the way for a new git sub-command which allows users to test their exclude lists from the command line. Signed-off-by: Adam Spiers --- dir.c | 38

[PATCH v2 10/14] For each exclude pattern, store information about where it came from

2012-09-20 Thread Adam Spiers
--exclude would be numbered -2. This allows any future consumers of that data to easily distinguish between exclude patterns from files vs. from the CLI. Signed-off-by: Adam Spiers --- builtin/clean.c| 2 +- builtin/ls-files.c | 3 ++- dir.c | 25 +++-- dir.h

<    1   2   3   >