Re: questions / suggestions about history simplification

2013-12-22 Thread Adam Spiers
On Sat, Dec 21, 2013 at 10:44:43PM -0800, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: I doubt it. 75% of the work for such a person to understand the behaviour from such an example is to understand what kind of history the example is building. Agreed. And that's

Re: [PATCH] check-ignore: Add option to ignore index contents

2013-08-29 Thread Adam Spiers
On Thu, Aug 29, 2013 at 11:46:52PM +0100, Dave Williams wrote: check-ignore currently shows how .gitignore rules would treat untracked paths. Tracked paths do not generate useful output. This prevents debugging of why a path became tracked unexpectedly unless that path is first removed from

[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 g...@adamspiers.org --- 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 g...@adamspiers.org --- Makefile | 2 ++ builtin/add.c | 82 +++ pathspec.c| 87

[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 g...@adamspiers.org --- builtin/clean.c| 2 +- builtin/ls-files.c | 3 ++- dir.c | 25

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

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

[PATCH 4/9] Refactor excluded_from_list

2012-09-01 Thread Adam Spiers
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 Spiers g

[PATCH 5/9] Refactor excluded and path_excluded

2012-09-01 Thread Adam Spiers
on 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 g

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

2012-09-01 Thread Adam Spiers
). 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. Thanks, Adam Adam Spiers (9): Update directory listing API

[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 g...@adamspiers.org

[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 g...@adamspiers.org --- Documentation/technical/api-directory-listing.txt | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

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

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

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 pclo...@gmail.com wrote: On Sun, Sep 2, 2012 at 7:12 AM, Adam Spiers g...@adamspiers.org wrote: This works in a similar manner to git-check-attr. Some code was reused from add.c

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 pclo...@gmail.com wrote: On Thu, Sep 6, 2012 at 9:59 PM, Thiago Farina tfrans...@gmail.com wrote: On Thu, Sep 6, 2012 at 9:13 AM, Nguyen Thai Ngoc Duy pclo...@gmail.com wrote: On Thu, Sep 6, 2012 at 10:21 AM, Junio C Hamano

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 gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org 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/ A quick

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 philipoak...@iee.org wrote: From: Junio C Hamano gits...@pobox.com Sent: Sunday, September 02, 2012 8:02 PM Philip Oakley philipoak...@iee.org writes: Is there a way to identify the config core.excludesfile if present? i.e. that it is from that

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 gits...@pobox.com 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 g...@adamspiers.org wrote: --- a/builtin/add.c +++ b/builtin/add.c @@ -273,7 +273,7 @@ static int add_files(struct dir_struct *dir, int flags) fprintf(stderr

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 gits...@pobox.com wrote: Nguyen Thai Ngoc Duy pclo...@gmail.com writes: +static void output_exclude(const char *path, struct exclude *exclude) +{ + char *type =

[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 g...@adamspiers.org --- 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

[PATCH] Make test output coloring more intuitive

2012-09-17 Thread Adam Spiers
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 g...@adamspiers.org --- t/t-basic.sh

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 failures, unexpected test passes, and failures

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 g...@adamspiers.org 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 coloring scheme, where

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 p...@peff.net 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,

[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 skipped tests the same

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

2012-09-19 Thread Adam Spiers
breakages from bold red to bold yellow to be less alarmist and more consistent with the above. Signed-off-by: Adam Spiers g...@adamspiers.org --- 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

[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 g...@adamspiers.org --- t/t-basic.sh | 44 +++- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/t

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

2012-09-19 Thread Adam Spiers
as a pass in the output. Signed-off-by: Adam Spiers g...@adamspiers.org --- 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

[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 g...@adamspiers.org --- 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

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

2012-09-19 Thread Adam Spiers
leave it non-bold in order to contrast with warnings. Signed-off-by: Adam Spiers g...@adamspiers.org --- 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

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

2012-09-19 Thread Adam Spiers
-by: Adam Spiers g...@adamspiers.org --- 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

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

2012-09-19 Thread Adam Spiers
as a pass in the output. Signed-off-by: Adam Spiers g...@adamspiers.org --- 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

[PATCH] Document conventions on static initialization and else cuddling

2012-09-19 Thread Adam Spiers
Signed-off-by: Adam Spiers g...@adamspiers.org --- 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

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_ used for things which have gone unexpectedly wrong

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-doc

[PATCH v4 3/6] Color skipped tests blue

2012-09-19 Thread Adam Spiers
instead we use blue which is a universal color for information signs. Signed-off-by: Adam Spiers g...@adamspiers.org --- 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

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 g...@adamspiers.org writes: Signed-off-by: Adam Spiers g...@adamspiers.org --- I have begun work on fixing existing code to adhere to these guidelines on braces, but there are currently a lot of violations

[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 +++

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 gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org writes: Signed-off-by: Adam Spiers g...@adamspiers.org --- t/t-basic.sh | 4 ++-- t/test-lib.sh| 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) mode change 100644

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 gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org 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

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 gits...@pobox.com 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

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 j.s...@viscovery.net 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 on black background

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

2012-09-20 Thread Adam Spiers
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 g...@adamspiers.org --- t/test-lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/test

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 gits...@pobox.com 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

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 gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org writes: On Thu, Sep 20, 2012 at 5:50 PM, Junio C Hamano gits...@pobox.com 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 g...@adamspiers.org --- Documentation/technical/api-directory-listing.txt | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

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

2012-09-20 Thread Adam Spiers
, 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() Rename excluded_from_list

[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 g...@adamspiers.org --- dir.c | 11

[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 g...@adamspiers.org --- attr.c | 2 +- dir.c | 10

[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: Adam

[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 g

[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 g...@adamspiers.org

[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 g...@adamspiers.org --- builtin/clean.c| 2 +- builtin/ls-files.c | 3 ++- dir.c | 25

[PATCH v2 11/14] Refactor treat_gitlinks()

2012-09-20 Thread Adam Spiers
Extract the body of the for loop in treat_gitlinks() into a separate treat_gitlink() function so that it can be reused elsewhere. This paves the way for a new check-ignore sub-command. Signed-off-by: Adam Spiers g...@adamspiers.org --- builtin/add.c | 49

[PATCH v2 12/14] Extract some useful pathspec handling code from builtin/add.c into a library

2012-09-20 Thread Adam Spiers
This is in preparation for reuse by a new git check-ignore command. Signed-off-by: Adam Spiers g...@adamspiers.org --- Makefile | 2 ++ builtin/add.c | 95 ++--- pathspec.c| 97

[PATCH v2 03/14] Rename cryptic 'which' variable to more consistent name

2012-09-20 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 g...@adamspiers.org --- dir.c | 10 +- dir.h | 4

[PATCH v2 13/14] Provide free_directory() for reclaiming dir_struct memory

2012-09-20 Thread Adam Spiers
Signed-off-by: Adam Spiers g...@adamspiers.org --- Documentation/technical/api-directory-listing.txt | 2 ++ dir.c | 23 +-- dir.h | 1 + 3 files changed, 24 insertions(+), 2 deletions

[PATCH v2 04/14] Rename path_excluded() to is_path_excluded()

2012-09-20 Thread Adam Spiers
Start adopting clearer names for exclude functions. This 'is_*' naming pattern for functions returning booleans was agreed here: http://thread.gmane.org/gmane.comp.version-control.git/204661/focus=204924 Signed-off-by: Adam Spiers g...@adamspiers.org --- builtin/add.c | 2 +- builtin/ls

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

2012-09-20 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 g...@adamspiers.org

[PATCH v2 02/14] Improve documentation and comments regarding directory traversal API

2012-09-20 Thread Adam Spiers
From the perspective of a newcomer to the codebase, the directory traversal API has a few potentially confusing properties. These comments clarify a few key aspects and will hopefully make it easier to understand for other newcomers in the future. Signed-off-by: Adam Spiers g...@adamspiers.org

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

2012-09-20 Thread Adam Spiers
On Thu, Sep 20, 2012 at 10:43 PM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: Adam Spiers g...@adamspiers.org writes: Adam Spiers (14): Update directory listing API doc to match code Improve documentation and comments regarding directory traversal API

Re: [PATCH] pathspec.c: Fix some sparse warnings

2012-09-25 Thread Adam Spiers
On Tue, Sep 25, 2012 at 6:15 PM, Ramsay Jones ram...@ramsay1.demon.co.uk wrote: Sparse issues a warning for all six external symbols defined in this file. In order to suppress the warnings, we include the 'pathspec.h' header file, which contains the relevant extern declarations for these

Re: [PATCH 12/12] Add git-check-ignore sub-command

2012-10-16 Thread Adam Spiers
Hi again, Firstly thanks very much for your recent work on this series! On Tue, Oct 16, 2012 at 4:08 AM, Nguyen Thai Ngoc Duy pclo...@gmail.com wrote: Adam, do you have time to continue this series? I can help polish it for inclusion, but I don't want to step in your way if you are quietly

Re: [PATCH 12/12] Add git-check-ignore sub-command

2012-10-16 Thread Adam Spiers
On Mon, Oct 15, 2012 at 3:31 PM, Junio C Hamano gits...@pobox.com wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: +For each pathname given via the command-line or from a file via +`--stdin`, this command will list the first exclude pattern found (if +any) which explicitly excludes or

Re: [PATCH] pathspec.c: Fix some sparse warnings

2012-10-28 Thread Adam Spiers
On Sun, Oct 28, 2012 at 9:09 PM, Ramsay Jones ram...@ramsay1.demon.co.uk wrote: Sparse issues a warning for all six external symbols defined in this file. In order to suppress the warnings, we include the 'pathspec.h' header file, which contains the relevant extern declarations for these

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

2012-11-10 Thread Adam Spiers
On Fri, Sep 21, 2012 at 02:13:25AM -0400, Jeff King wrote: On Wed, Sep 19, 2012 at 09:24:23PM +0100, Adam Spiers wrote: 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

splitting off shell test framework

2012-11-12 Thread Adam Spiers
Hi all, I've been pretty impressed with git's test framework, and I'm not aware of many other (decent) shell-based test frameworks out there. (One that springs to mind is the one used by rvm, but last time I looked - admittedly a while ago now - it had limitations). Recently a situation arose

Re: splitting off shell test framework

2012-11-12 Thread Adam Spiers
On Mon, Nov 12, 2012 at 6:18 PM, Drew Northup n1xim.em...@gmail.com wrote: On Mon, Nov 12, 2012 at 11:37 AM, Adam Spiers g...@adamspiers.org wrote: As it turned out to be fairly easy, I was wondering if there would be any interest in doing this more formally, i.e. splitting off the framework

Re: Duplicate test numbers in pu.

2012-11-22 Thread Adam Spiers
On Wed, Nov 21, 2012 at 7:14 PM, Ramsay Jones ram...@ramsay1.demon.co.uk wrote: I noticed that the pu branch has two tests with number t0007, viz: $ cd t $ make test-lint-duplicates duplicate test numbers: t0007 make: *** [test-lint-duplicates] Error 1 $ In particular,

Re: Topics currently in the Stalled category

2012-11-30 Thread Adam Spiers
On Wed, Nov 21, 2012 at 12:05 AM, Junio C Hamano gits...@pobox.com wrote: Here is a list of stalled topics I am having trouble deciding what to do (the default is to dismiss them around feature freeze). [snipped] * as/check-ignore (2012-11-08) 14 commits - t0007: fix tests on Windows -

[PATCH v6 2/7] tests: paint known breakages in bold yellow

2012-12-16 Thread Adam Spiers
breakages from bold red to bold yellow to be less alarmist and more consistent with the above. Signed-off-by: Adam Spiers g...@adamspiers.org --- 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 d0b236f..710f051 100644 --- a/t

[PATCH v6 4/7] tests: change info messages from yellow/brown to bold cyan

2012-12-16 Thread Adam Spiers
of other test suites. Therefore we use bold cyan which is also blue-ish, but visually distinct from bold blue. This was suggested on the list a while ago and no-one raised any objections: http://thread.gmane.org/gmane.comp.version-control.git/205675/focus=205966 Signed-off-by: Adam Spiers g

[PATCH v6 5/7] tests: refactor mechanics of testing in a sub test-lib

2012-12-16 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 g...@adamspiers.org --- t/t-basic.sh | 85 ++-- 1 file changed, 40 insertions(+), 45 deletions(-) diff

[PATCH v6 1/7] tests: test number comes first in 'not ok $count - $message'

2012-12-16 Thread Adam Spiers
The old output to say not ok - 1 messsage was working by accident only because the test numbers are optional in TAP. Signed-off-by: Adam Spiers g...@adamspiers.org --- t/t-basic.sh | 4 ++-- t/test-lib.sh| 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t

[PATCH v6 3/7] tests: paint skipped tests in bold blue

2012-12-16 Thread Adam Spiers
Skipped tests indicate incomplete test coverage. Whilst this is not a test failure or other error, it's still not a complete success. Other testsuite related software like automake, autotest and prove seem to use blue for skipped tests, so let's follow suit. Signed-off-by: Adam Spiers g

[PATCH v6 0/7] make test output coloring more intuitive

2012-12-16 Thread Adam Spiers
have enough different possible outputs to warrant them being covered in the test framework's self-tests. Therefore this series also refactors and extends the self-tests. Adam Spiers (7): tests: test number comes first in 'not ok $count - $message' tests: paint known breakages in bold yellow

[PATCH v6 6/7] tests: test the test framework more thoroughly

2012-12-16 Thread Adam Spiers
-by: Adam Spiers g...@adamspiers.org --- t/t-basic.sh | 104 +++ 1 file changed, 104 insertions(+) diff --git a/t/t-basic.sh b/t/t-basic.sh index fc5200f..5c1dde0 100755 --- a/t/t-basic.sh +++ b/t/t-basic.sh @@ -79,6 +79,55

[PATCH v6 7/7] tests: paint unexpectedly fixed known breakages in bold red

2012-12-16 Thread Adam Spiers
as a pass in the output. Signed-off-by: Adam Spiers g...@adamspiers.org --- 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 5c1dde0..bd6127f 100755

Re: [PATCH v6 0/7] make test output coloring more intuitive

2012-12-16 Thread Adam Spiers
On Sun, Dec 16, 2012 at 6:54 PM, Junio C Hamano gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org writes: This series of commits attempts to make test output coloring more intuitive,... Thanks; I understand that this is to replace the previous one b465316 (tests: paint unexpectedly

[PATCH 1/3] SubmittingPatches: add convention of prefixing commit messages

2012-12-16 Thread Adam Spiers
Conscientious newcomers to git development will read SubmittingPatches and CodingGuidelines, but could easily miss the convention of prefixing commit messages with a single word identifying the file or area the commit touches. Signed-off-by: Adam Spiers g...@adamspiers.org --- Documentation

[PATCH 0/3] Help newbie git developers avoid obvious pitfalls

2012-12-16 Thread Adam Spiers
I fell into various newbie pitfalls when submitting my first patches to git, despite my best attempts to adhere to documented guidelines. This small patch series attempts to reduce the chances of other developers making the same mistakes I did. Adam Spiers (3): SubmittingPatches: add convention

[PATCH 3/3] Makefile: use -Wdeclaration-after-statement if supported

2012-12-16 Thread Adam Spiers
CodingGuidelines requests that code should be nice to older C compilers. Since modern gcc can warn on code written using newer dialects such as C99, it makes sense to take advantage of this by auto-detecting this capability and enabling it when found. Signed-off-by: Adam Spiers g

[PATCH 2/3] Documentation: move support for old compilers to CodingGuidelines

2012-12-16 Thread Adam Spiers
The Try to be nice to older C compilers text is clearly a guideline to be borne in mind whilst coding rather than when submitting patches. Signed-off-by: Adam Spiers g...@adamspiers.org --- Documentation/CodingGuidelines | 8 Documentation/SubmittingPatches | 13 - 2 files

compiler checks

2012-12-16 Thread Adam Spiers
On Fri, Sep 21, 2012 at 12:00:55PM -0700, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: It has been rebased on the latest master, and passed a full test run. FYI, I applied the attached on top before queuing it in 'pu'. Points to note: * We match the underline

Re: [PATCH 12/12] Add git-check-ignore sub-command

2012-12-16 Thread Adam Spiers
On Tue, Oct 16, 2012 at 09:12:58AM -0700, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: On Mon, Oct 15, 2012 at 3:31 PM, Junio C Hamano gits...@pobox.com wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: +For each pathname given via the command-line or from a file via

$PATH pollution and t9902-completion.sh

2012-12-16 Thread Adam Spiers
t/t9902-completion.sh is currently failing for me because I happen to have a custom shell-script called git-check-email in ~/bin, which is on my $PATH. This is different to a similar-looking case reported recently, which was due to an unclean working tree:

Re: [PATCH 3/3] Makefile: use -Wdeclaration-after-statement if supported

2012-12-16 Thread Adam Spiers
On Sun, Dec 16, 2012 at 05:52:05PM -0800, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: If we adopt this approach,... diff --git a/Makefile b/Makefile index a49d1db..aae70d4 100644 --- a/Makefile +++ b/Makefile @@ -331,8 +331,13 @@ endif # CFLAGS and LDFLAGS

Re: $PATH pollution and t9902-completion.sh

2012-12-20 Thread Adam Spiers
On Thu, Dec 20, 2012 at 2:55 PM, Jeff King p...@peff.net wrote: On Mon, Dec 17, 2012 at 01:05:38AM +, Adam Spiers wrote: t/t9902-completion.sh is currently failing for me because I happen to have a custom shell-script called git-check-email in ~/bin, which is on my $PATH

Re: [PATCH v6 0/7] make test output coloring more intuitive

2012-12-20 Thread Adam Spiers
On Thu, Dec 20, 2012 at 3:34 PM, Jeff King p...@peff.net wrote: On Sun, Dec 16, 2012 at 07:01:56PM +, Adam Spiers wrote: On Sun, Dec 16, 2012 at 6:54 PM, Junio C Hamano gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org writes: This series of commits attempts to make test output

Re: [PATCH v6 0/7] make test output coloring more intuitive

2012-12-20 Thread Adam Spiers
On Thu, Dec 20, 2012 at 4:11 PM, Jeff King p...@peff.net wrote: On Thu, Dec 20, 2012 at 03:44:53PM +, Adam Spiers wrote: diff --git a/t/test-lib.sh b/t/test-lib.sh index 256f1c6..31f59af 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -227,7 +227,7 @@ then pass

Re: [PATCH v6 0/7] make test output coloring more intuitive

2012-12-20 Thread Adam Spiers
On Thu, Dec 20, 2012 at 7:21 PM, Junio C Hamano gits...@pobox.com wrote: Jeff King p...@peff.net writes: Good point, I forgot to check what it looked like with -v. Since this series is already on v6, is there a more lightweight way of addressing this tiny tweak than sending v7? It is

Re: [PATCH v7 0/7] coloring test output after traffic signal

2012-12-21 Thread Adam Spiers
On Fri, Dec 21, 2012 at 8:15 AM, Jeff King p...@peff.net wrote: On Thu, Dec 20, 2012 at 07:12:31PM -0800, Junio C Hamano wrote: To conclude the bikeshedding discussion we had today, here is what I queued by squashing stuff into relevant patches, so that people can eyeball the result for the

Re: [PATCH 3/3] Makefile: use -Wdeclaration-after-statement if supported

2012-12-22 Thread Adam Spiers
On Mon, Dec 17, 2012 at 4:18 AM, Junio C Hamano gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org writes: OK; I expect these issues with the implementation are all surmountable. I did not necessarily expect this to be the final implementation anyhow, as indicated by my comments below

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

2012-12-26 Thread Adam Spiers
On Thu, Sep 20, 2012 at 10:43 PM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: Adam Spiers g...@adamspiers.org writes: Adam Spiers (14): Update directory listing API doc to match code Improve documentation and comments regarding directory traversal API

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

2012-12-26 Thread Adam Spiers
On Thu, Sep 20, 2012 at 02:31:57PM -0700, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: void add_exclude(const char *string, const char *base, -int baselen, struct exclude_list *el) +int baselen, struct exclude_list *el, const char *src, int

[PATCH v3 00/19] new git check-ignore sub-command

2012-12-26 Thread Adam Spiers
relating to git-svn. Adam Spiers (19): api-directory-listing.txt: update to match code Improve documentation and comments regarding directory traversal API dir.c: rename cryptic 'which' variable to more consistent name dir.c: rename path_excluded() to is_path_excluded() dir.c: rename

[PATCH v3 01/19] api-directory-listing.txt: update to match code

2012-12-26 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 g...@adamspiers.org --- For some reason this patch was dropped from the v2 series when it was applied to the 'pu' branch. Documentation/technical/api

[PATCH v3 02/19] Improve documentation and comments regarding directory traversal API

2012-12-26 Thread Adam Spiers
From the perspective of a newcomer to the codebase, the directory traversal API has a few potentially confusing properties. These comments clarify a few key aspects and will hopefully make it easier to understand for other newcomers in the future. Signed-off-by: Adam Spiers g...@adamspiers.org

[PATCH v3 05/19] dir.c: rename excluded_from_list() to is_excluded_from_list()

2012-12-26 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 Also adjust their callers as necessary. Signed-off-by: Adam Spiers g

[PATCH v3 07/19] dir.c: refactor is_excluded_from_list()

2012-12-26 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: Adam

  1   2   3   >