[PATCH v2] compat: Fix read() of 2GB and more on Mac OS X

2013-08-19 Thread Steffen Prohaska
Previously, filtering 2GB or more through an external filter (see test) failed on Mac OS X 10.8.4 (12E55) for a 64-bit executable with: error: read from external filter cat failed error: cannot feed the input to external filter cat error: cat died of signal 13 error: external

Re: [PATCH v2] compat: Fix read() of 2GB and more on Mac OS X

2013-08-19 Thread Johannes Sixt
Am 19.08.2013 08:38, schrieb Steffen Prohaska: +test_expect_success EXPENSIVE 'filter large file' ' + git config filter.largefile.smudge cat + git config filter.largefile.clean cat + for i in $(test_seq 1 2048); do printf %1048576d 1; done 2GB Shouldn't you count to 2049

Re: [PATCH v2] compat: Fix read() of 2GB and more on Mac OS X

2013-08-19 Thread Steffen Prohaska
On Aug 19, 2013, at 9:54 AM, John Keeping j...@keeping.me.uk wrote: You've created compat/clipped-read.c, but... Makefile | 8 builtin/var.c | 1 + config.mak.uname | 1 + git-compat-util.h | 5 + streaming.c | 1 +

Re: [PATCH v2] compat: Fix read() of 2GB and more on Mac OS X

2013-08-19 Thread Stefan Beller
On 08/19/2013 10:20 AM, Johannes Sixt wrote: Am 19.08.2013 08:38, schrieb Steffen Prohaska: +test_expect_success EXPENSIVE 'filter large file' ' +git config filter.largefile.smudge cat +git config filter.largefile.clean cat +for i in $(test_seq 1 2048); do printf %1048576d 1;

Re: [PATCH v2] compat: Fix read() of 2GB and more on Mac OS X

2013-08-19 Thread Johannes Sixt
Am 19.08.2013 08:38, schrieb Steffen Prohaska: Note that 'git add' exits with 0 even if it prints filtering errors to stderr. The test, therefore, checks stderr. 'git add' should probably be changed (sometime in another commit) to exit with nonzero if filtering fails. The test could then be

Re: [PATCH v2] compat: Fix read() of 2GB and more on Mac OS X

2013-08-19 Thread Steffen Prohaska
On Aug 19, 2013, at 10:20 AM, Johannes Sixt j...@kdbg.org wrote: Am 19.08.2013 08:38, schrieb Steffen Prohaska: +test_expect_success EXPENSIVE 'filter large file' ' +git config filter.largefile.smudge cat +git config filter.largefile.clean cat +for i in $(test_seq 1 2048); do

Re: [PATCH v2] compat: Fix read() of 2GB and more on Mac OS X

2013-08-19 Thread Johannes Sixt
Am 19.08.2013 10:25, schrieb Stefan Beller: On 08/19/2013 10:20 AM, Johannes Sixt wrote: Am 19.08.2013 08:38, schrieb Steffen Prohaska: +test_expect_success EXPENSIVE 'filter large file' ' +git config filter.largefile.smudge cat +git config filter.largefile.clean cat +for i in

Re: [PATCH v2] compat: Fix read() of 2GB and more on Mac OS X

2013-08-19 Thread Torsten Bögershausen
On 2013-08-19 08.38, Steffen Prohaska wrote: [snip] diff --git a/builtin/var.c b/builtin/var.c index aedbb53..e59f5ba 100644 --- a/builtin/var.c +++ b/builtin/var.c @@ -38,6 +38,7 @@ static struct git_var git_vars[] = { { , NULL }, }; +#undef read This is techically right for