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 die(line is badly quoted);

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 out I just noticed that this patch

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

2013-04-11 Thread Jeff King
On Thu, Apr 11, 2013 at 12:20:00PM +0100, Adam Spiers wrote: 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

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

2013-04-10 Thread Adam Spiers
Some callers, such as the git-annex web assistant, find it useful to invoke git check-ignore as a persistent background process, which can then have queries fed to its STDIN at any point, and the corresponding response consumed from its STDOUT. For this we need to invoke check_ignore() once per

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

2013-04-10 Thread Jeff King
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 die(line is badly quoted); strbuf_swap(buf, nbuf); } -