{"thread":{"id":"45384","subject":"Commiting files larger than 4 GB on Windows","startedAt":"2017-03-15T13:01:07Z","lastAt":"2017-03-18T14:05:16Z","messageCount":9,"participants":["Florian Adamus","Thomas Braun","Jeff King","Torsten Bögershausen","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"314129","messageId":"trinity-9f703269-6f73-4f6d-b90b-45e09e1c094c-1489582854278@3capp-gmx-bs66","threadId":"45384","inReplyTo":null,"subject":"Commiting files larger than 4 GB on Windows","fromName":"Florian Adamus","fromEmail":"florian-adamus@gmx.de","sentAt":"2017-03-15T13:00:54Z","receivedAt":"2017-03-15T13:01:07Z","isPatch":false,"sender":{"key":"florian-adamus@gmx.de","avatar":null},"body":"Hello,\n\nI am managing my large files with the git-lfs-extension. Some of them were more than 4GB in size. After deleting one of those files from my working tree and do a normal git checkout I ended up with a somehow crippled file with a size of only 46 MB left.\nFor testing reasons I tried to commit a 4,3 GB file to my git repository without the LFS extension.\nAfter checking out a different branch and switching back to the branch with the large file, I ended up with the same small file as mentioned before.\nI already wrote a bug issues to Git for Windows and I was told that it is a problem with the git source code, which uses unsinged long, where it should use size_t.\nFor more information on the issue you can check the issue tracker of Git for Windows on github. Issue #1063\nIs there a way to fix this problem?\n \nbest regards\n"},{"id":"314134","messageId":"179b5d92-ee96-c2df-dbd8-eb96f7bbdb24@virtuell-zuhause.de","threadId":"45384","inReplyTo":"trinity-9f703269-6f73-4f6d-b90b-45e09e1c094c-1489582854278@3capp-gmx-bs66","subject":"Re: Commiting files larger than 4 GB on Windows","fromName":"Thomas Braun","fromEmail":"thomas.braun@virtuell-zuhause.de","sentAt":"2017-03-15T13:48:57Z","receivedAt":"2017-03-15T13:50:33Z","isPatch":false,"sender":{"key":"thomas.braun@virtuell-zuhause.de","avatar":"https://avatars.githubusercontent.com/u/1185677?v=4"},"body":"Am 15.03.2017 um 14:00 schrieb Florian Adamus:\n> Hello,\n> \n> I am managing my large files with the git-lfs-extension. Some of them\n> were more than 4GB in size. After deleting one of those files from my\n> working tree and do a normal git checkout I ended up with a somehow\n> crippled file with a size of only 46 MB left. For testing reasons I\n> tried to commit a 4,3 GB file to my git repository without the LFS\n> extension. After checking out a different branch and switching back\n> to the branch with the large file, I ended up with the same small\n> file as mentioned before. I already wrote a bug issues to Git for\n> Windows and I was told that it is a problem with the git source code,\n> which uses unsinged long, where it should use size_t. For more\n> information on the issue you can check the issue tracker of Git for\n> Windows on github. Issue #1063 Is there a way to fix this problem?\n\nHi,\n\nI can not comment on the git-lfs issues. The issue that you can not properly use files larger than 4GB on windows (no matter if 32bit or 64bit) is known, see my findings from May last year [1]. Unfortunately nobody, including me, did find time to fix the underlying issue properly.\n\nMy band-aid patch from [1]\n\ndiff --git a/pack-write.c b/pack-write.c\nindex 33293ce..ebb8b0a 100644\n--- a/pack-write.c\n+++ b/pack-write.c\n@@ -313,6 +313,9 @@ int encode_in_pack_object_header(enum object_type type, uintmax_t size, unsigned\n        if (type < OBJ_COMMIT || type > OBJ_REF_DELTA)\n                die(\"bad type %d\", type);\n\n+       if (bitsizeof(unsigned long) != bitsizeof(uintmax_t) && size > (unsigned long) size)\n+               die(\"Cannot handle files this big\");\n+\n        c = (type << 4) | (size & 15);\n        size >>= 4;\n        while (size) {\n\nwould at least tell the user much earlier about the problem. I can submit the above diff as proper patch if it is deemed a worthy change.\n\nThomas\n\n[1]: http://public-inbox.org/git/56EF1402.4050708@virtuell-zuhause.de/  \n\n\n\n"},{"id":"314140","messageId":"20170315155952.x2tpiudi6rbqidvi@sigill.intra.peff.net","threadId":"45384","inReplyTo":"179b5d92-ee96-c2df-dbd8-eb96f7bbdb24@virtuell-zuhause.de","subject":"Re: Commiting files larger than 4 GB on Windows","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-03-15T15:59:52Z","receivedAt":"2017-03-15T16:02:34Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Mar 15, 2017 at 02:48:57PM +0100, Thomas Braun wrote:\n\n> I can not comment on the git-lfs issues. The issue that you can not\n> properly use files larger than 4GB on windows (no matter if 32bit or\n> 64bit) is known, see my findings from May last year [1]. Unfortunately\n> nobody, including me, did find time to fix the underlying issue\n> properly.\n\nI suspect the fix is going to be quite involved. The use of \"unsigned\nlong\" for object sizes is all over the code base.\n\n> My band-aid patch from [1]\n> \n> diff --git a/pack-write.c b/pack-write.c\n> index 33293ce..ebb8b0a 100644\n> --- a/pack-write.c\n> +++ b/pack-write.c\n> @@ -313,6 +313,9 @@ int encode_in_pack_object_header(enum object_type type, uintmax_t size, unsigned\n>         if (type < OBJ_COMMIT || type > OBJ_REF_DELTA)\n>                 die(\"bad type %d\", type);\n> \n> +       if (bitsizeof(unsigned long) != bitsizeof(uintmax_t) && size > (unsigned long) size)\n> +               die(\"Cannot handle files this big\");\n> +\n>         c = (type << 4) | (size & 15);\n>         size >>= 4;\n>         while (size) {\n> \n> would at least tell the user much earlier about the problem. I can\n> submit the above diff as proper patch if it is deemed a worthy change.\n\nI agree that detecting the situation in the meantime is a good idea.\nThe patch above probably handles the bulk-checkin code path, I'd guess.\nIt might be nice to have similar checks in other places, too:\n\n  - when reading from an existing packfile\n\n    Looks like we may already have such a check in\n    unpack_object_header_buffer().\n\n  - when taking in new objects via index-pack or unpack-objects (to\n    catch a fetch of a too-big object)\n\n    I think index-pack.c:unpack_raw_entry() would want a similar check\n    to what is in unpack_object_header_buffer().\n\n-Peff\n"},{"id":"314143","messageId":"20170315161308.sbyoxzst7ffcu6qs@sigill.intra.peff.net","threadId":"45384","inReplyTo":"20170315155952.x2tpiudi6rbqidvi@sigill.intra.peff.net","subject":"Re: Commiting files larger than 4 GB on Windows","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-03-15T16:13:08Z","receivedAt":"2017-03-15T16:15:52Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Mar 15, 2017 at 11:59:52AM -0400, Jeff King wrote:\n\n> I agree that detecting the situation in the meantime is a good idea.\n> The patch above probably handles the bulk-checkin code path, I'd guess.\n> It might be nice to have similar checks in other places, too:\n> \n>   - when reading from an existing packfile\n> \n>     Looks like we may already have such a check in\n>     unpack_object_header_buffer().\n> \n>   - when taking in new objects via index-pack or unpack-objects (to\n>     catch a fetch of a too-big object)\n> \n>     I think index-pack.c:unpack_raw_entry() would want a similar check\n>     to what is in unpack_object_header_buffer().\n\nHere are the results of a few quick experiments using two versions of\ngit, one built for 32-bit and one for 64-bit:\n\n  $ git init\n  $ dd if=/dev/zero of=foo.zero bs=1M count=4097\n  $ git32 add foo.zero\n  fatal: Cannot handle files this big\n\nThat comes from the xsize_t() wrapper. I guess it wouldn't trigger on\nWindows, though, because it is measuring size_t, not \"unsigned long\" (on\nmy 32-bit build they are the same, of course).\n\n  $ git64 add foo.zero\n  $ git32 cat-file blob :foo.zero\n  error: bad object header\n  fatal: packed object df6f032f301d1ce40477eefa505f2fac1de5e243 (stored in .git/objects/pack/pack-57d422f19904e9651bec43d10b7a9cd882de48ac.pack) is corrupt\n\nSo we notice, which is good. This is the message from\nunpack_object_header_buffer(). It might be worth improving the error\nmessage to mention the integer overflow.\n\nAnd here's what index-pack looks like:\n\n  $ git32 index-pack --stdin <.git/objects/pack/*.pack\n  fatal: pack has bad object at offset 12: inflate returned -5\n\nIt's good that we notice, but the error message isn't great. What\nhappens is that we overflow the size integer, allocate a too-small\nbuffer, and then zlib complains when we run out of buffer but there's\nstill content to inflate. We probably ought to notice the integer\noverflow in the first place and complain there.\n\n-Peff\n"},{"id":"314153","messageId":"217dc281-e767-b2b3-07b9-c1d243261d27@virtuell-zuhause.de","threadId":"45384","inReplyTo":"20170315161308.sbyoxzst7ffcu6qs@sigill.intra.peff.net","subject":"Re: Commiting files larger than 4 GB on Windows","fromName":"Thomas Braun","fromEmail":"thomas.braun@virtuell-zuhause.de","sentAt":"2017-03-15T18:23:04Z","receivedAt":"2017-03-15T18:25:04Z","isPatch":false,"sender":{"key":"thomas.braun@virtuell-zuhause.de","avatar":"https://avatars.githubusercontent.com/u/1185677?v=4"},"body":"Am 15.03.2017 um 17:13 schrieb Jeff King:\n> On Wed, Mar 15, 2017 at 11:59:52AM -0400, Jeff King wrote:\n> \n>> I agree that detecting the situation in the meantime is a good idea.\n>> The patch above probably handles the bulk-checkin code path, I'd guess.\n>> It might be nice to have similar checks in other places, too:\n>>\n>>   - when reading from an existing packfile\n>>\n>>     Looks like we may already have such a check in\n>>     unpack_object_header_buffer().\n>>\n>>   - when taking in new objects via index-pack or unpack-objects (to\n>>     catch a fetch of a too-big object)\n>>\n>>     I think index-pack.c:unpack_raw_entry() would want a similar check\n>>     to what is in unpack_object_header_buffer().\n> \n> Here are the results of a few quick experiments using two versions of\n> git, one built for 32-bit and one for 64-bit:\n> \n>   $ git init\n>   $ dd if=/dev/zero of=foo.zero bs=1M count=4097\n>   $ git32 add foo.zero\n>   fatal: Cannot handle files this big\n> \n> That comes from the xsize_t() wrapper. I guess it wouldn't trigger on\n> Windows, though, because it is measuring size_t, not \"unsigned long\" (on\n> my 32-bit build they are the same, of course).\n> \n>   $ git64 add foo.zero\n>   $ git32 cat-file blob :foo.zero\n>   error: bad object header\n>   fatal: packed object df6f032f301d1ce40477eefa505f2fac1de5e243 (stored in .git/objects/pack/pack-57d422f19904e9651bec43d10b7a9cd882de48ac.pack) is corrupt\n> \n> So we notice, which is good. This is the message from\n> unpack_object_header_buffer(). It might be worth improving the error\n> message to mention the integer overflow.\n> \n> And here's what index-pack looks like:\n> \n>   $ git32 index-pack --stdin <.git/objects/pack/*.pack\n>   fatal: pack has bad object at offset 12: inflate returned -5\n> \n> It's good that we notice, but the error message isn't great. What\n> happens is that we overflow the size integer, allocate a too-small\n> buffer, and then zlib complains when we run out of buffer but there's\n> still content to inflate. We probably ought to notice the integer\n> overflow in the first place and complain there.\n\nThanks for the pointers Peff. I'll try to come up with a patch in the\nnext weeks. If somebody else steps in the meantime I'm not mad at all.\n\nThomas\n"},{"id":"314174","messageId":"93ccf86d-0090-a311-9825-7e23fd6a4141@web.de","threadId":"45384","inReplyTo":"20170315161308.sbyoxzst7ffcu6qs@sigill.intra.peff.net","subject":"Re: Commiting files larger than 4 GB on Windows","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2017-03-15T21:15:46Z","receivedAt":"2017-03-15T21:16:09Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2017-03-15 17:13, Jeff King wrote:\n> On Wed, Mar 15, 2017 at 11:59:52AM -0400, Jeff King wrote:\n> \n>> I agree that detecting the situation in the meantime is a good idea.\n>> The patch above probably handles the bulk-checkin code path, I'd guess.\n>> It might be nice to have similar checks in other places, too:\n>>\n>>   - when reading from an existing packfile\n>>\n>>     Looks like we may already have such a check in\n>>     unpack_object_header_buffer().\n>>\n>>   - when taking in new objects via index-pack or unpack-objects (to\n>>     catch a fetch of a too-big object)\n>>\n>>     I think index-pack.c:unpack_raw_entry() would want a similar check\n>>     to what is in unpack_object_header_buffer().\n> \n> Here are the results of a few quick experiments using two versions of\n> git, one built for 32-bit and one for 64-bit:\n> \n>   $ git init\n>   $ dd if=/dev/zero of=foo.zero bs=1M count=4097\n>   $ git32 add foo.zero\n>   fatal: Cannot handle files this big\n> \n> That comes from the xsize_t() wrapper. I guess it wouldn't trigger on\n> Windows, though, because it is measuring size_t, not \"unsigned long\" (on\n> my 32-bit build they are the same, of course).\n> \n>   $ git64 add foo.zero\n>   $ git32 cat-file blob :foo.zero\n>   error: bad object header\n>   fatal: packed object df6f032f301d1ce40477eefa505f2fac1de5e243 (stored in .git/objects/pack/pack-57d422f19904e9651bec43d10b7a9cd882de48ac.pack) is corrupt\n> \n> So we notice, which is good. This is the message from\n> unpack_object_header_buffer(). It might be worth improving the error\n> message to mention the integer overflow.\n> \n> And here's what index-pack looks like:\n> \n>   $ git32 index-pack --stdin <.git/objects/pack/*.pack\n>   fatal: pack has bad object at offset 12: inflate returned -5\n> \n> It's good that we notice, but the error message isn't great. What\n> happens is that we overflow the size integer, allocate a too-small\n> buffer, and then zlib complains when we run out of buffer but there's\n> still content to inflate. We probably ought to notice the integer\n> overflow in the first place and complain there.\n> \n> -Peff\n> \n\nThere is a bunch of problems when compiling on a 32 bit system.\nsize_t is 32 bit, but off_t is 64.\n===================\nSome fixes which improve things, (but Windows in the 64 bit version\nhas both size_t and off_t 64 bit, so this is a problem for a 32 bit system.\nThe real \"show stopper\" is at the end.\n\n\n--- a/bulk-checkin.c\n+++ b/bulk-checkin.c\n@@ -183,7 +183,7 @@ static void prepare_to_stream(struct bulk_checkin_state *state,\n\n static int deflate_to_pack(struct bulk_checkin_state *state,\n                           unsigned char result_sha1[],\n-                          int fd, size_t size,\n+                          int fd, off_t size,\n                           enum object_type type, const char *path,\n                           unsigned flags)\n {\n@@ -252,7 +252,7 @@ static int deflate_to_pack(struct bulk_checkin_state *state,\n }\n\n int index_bulk_checkin(unsigned char *sha1,\n-                      int fd, size_t size, enum object_type type,\n+                      int fd, off_t size, enum object_type type,\n                       const char *path, unsigned flags)\n {\n\ndiff --git a/bulk-checkin.h b/bulk-checkin.h\nindex fbd40fc..a385e61 100644\n--- a/bulk-checkin.h\n+++ b/bulk-checkin.h\n@@ -5,7 +5,7 @@\n #define BULK_CHECKIN_H\n\n extern int index_bulk_checkin(unsigned char sha1[],\n-                             int fd, size_t size, enum object_type type,\n+                             int fd, off_t size, enum object_type type,\n                              const char *path, unsigned flags);\n\n extern void plug_bulk_checkin(void);\ndiff --git a/diff.c b/diff.c\nindex 051761b..f1d7ac3 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -2857,7 +2857,9 @@ int diff_populate_filespec(struct diff_filespec *s,\nunsigned int flags)\n                                return err;\n                        }\n                }\n-               s->size = xsize_t(st.st_size);\n+               s->size = xoff_t(st.st_size);\n+               if (s->size > (size_t) s->size)\n+                       return 0;\n                if (!s->size)\n                        goto empty;\n                if (S_ISLNK(st.st_mode)) {\n\n=======================\nAfter a while we run into the fact that Git wants to produce a diff:\n\ndiff --git a/diffcore.h b/diffcore.h\nindex 6230241..852214c 100644\n--- a/diffcore.h\n+++ b/diffcore.h\n@@ -22,6 +22,15 @@\n\n #define MINIMUM_BREAK_SIZE     400 /* do not break a file smaller than this */\n\n+static inline off_t xyoff_t(off_t len, const char *fff, int lll)\n+{\n+       if (len > (off_t) len)\n+          die(\"Cannot handle files this big (%s:%d)\", fff, lll);\n+       return (off_t)len;\n+}\n+\n+#define xoff_t(o) xyoff_t((o), __FILE__, __LINE__)\n+\n struct userdiff_driver;\n\n struct diff_filespec {\n@@ -29,7 +38,7 @@ struct diff_filespec {\n        char *path;\n        void *data;\n        void *cnt_data;\n-       unsigned long size;\n+       off_t size;\n        int count;               /* Reference count */\n        int rename_used;         /* Count of rename users */\n        unsigned short mode;     /* file mode */\n\n\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex ef6d560..318e998 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -881,13 +881,15 @@ static inline char *xstrdup_or_null(const char *str)\n        return str ? xstrdup(str) : NULL;\n }\n\n-static inline size_t xsize_t(off_t len)\n+static inline size_t xysize_t(off_t len, const char *fff, int lll)\n {\n        if (len > (size_t) len)\n-               die(\"Cannot handle files this big\");\n+               die(\"Cannot handle files this big (%s:%d)\", fff, lll);\n        return (size_t)len;\n }\n\n+#define xsize_t(o) xysize_t((o), __FILE__, __LINE__)\n+\n __attribute__((format (printf, 3, 4)))\n extern int xsnprintf(char *dst, size_t max, const char *fmt, ...);\n\ndiff --git a/sha1_file.c b/sha1_file.c\nindex ec957db..807123c 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -3561,7 +3561,7 @@ static int index_core(unsigned char *sha1, int fd, size_t\nsize,\n  * binary blobs, they generally do not want to get any conversion, and\n  * callers should avoid this code path when filters are requested.\n  */\n-static int index_stream(unsigned char *sha1, int fd, size_t size,\n+static int index_stream(unsigned char *sha1, int fd, off_t size,\n                        enum object_type type, const char *path,\n                        unsigned flags)\n {\n@@ -3586,7 +3586,7 @@ int index_fd(unsigned char *sha1, int fd, struct stat *st,\n                ret = index_core(sha1, fd, xsize_t(st->st_size), type, path,\n                                 flags);\n        else\n-               ret = index_stream(sha1, fd, xsize_t(st->st_size), type, path,\n+               ret = index_stream(sha1, fd, st->st_size, type, path,\n                                   flags);\n        close(fd);\n        return ret;\n\n\n==========================\nAnd it seams as if zlib is the limitation here.\nUnless we include the zlib source code into Git and redefine uLong,\nis there a nice way around this:\n===========================\n\n\n/usr/include/zconf.h:#  define uLong                 z_uLong\n/usr/include/zconf.h:#  define uLongf                z_uLongf\n/usr/include/zconf.h:typedef unsigned long  uLong; /* 32 bits or more */\n/usr/include/zconf.h:typedef uLong FAR uLongf;\n\n\n"},{"id":"314181","messageId":"xmqq4lyudyaq.fsf@gitster.mtv.corp.google.com","threadId":"45384","inReplyTo":"93ccf86d-0090-a311-9825-7e23fd6a4141@web.de","subject":"Re: Commiting files larger than 4 GB on Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-03-15T21:29:01Z","receivedAt":"2017-03-15T21:33:10Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Torsten Bögershausen <tboegi@web.de> writes:\n\n> The real \"show stopper\" is at the end.\n> ...\n>\n> ==========================\n> And it seams as if zlib is the limitation here.\n> Unless we include the zlib source code into Git and redefine uLong,\n> is there a nice way around this:\n> ===========================\n>\n>\n> /usr/include/zconf.h:#  define uLong                 z_uLong\n> /usr/include/zconf.h:#  define uLongf                z_uLongf\n> /usr/include/zconf.h:typedef unsigned long  uLong; /* 32 bits or more */\n> /usr/include/zconf.h:typedef uLong FAR uLongf;\n\nHmph.  Would ef49a7a0 (\"zlib: zlib can only process 4GB at a time\",\n2011-06-10) and e01503b5 (\"zlib: allow feeding more than 4GB in one\ngo\", 2011-06-10) help us here, though?\n\n"},{"id":"314308","messageId":"2ebd249b-39a4-23c2-13e3-23c91a938313@web.de","threadId":"45384","inReplyTo":"xmqq4lyudyaq.fsf@gitster.mtv.corp.google.com","subject":"Re: Commiting files larger than 4 GB on Windows","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2017-03-17T05:29:57Z","receivedAt":"2017-03-17T05:36:41Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 15/03/17 22:29, Junio C Hamano wrote:\n> Torsten Bögershausen <tboegi@web.de> writes:\n>\n>> The real \"show stopper\" is at the end.\n>> ...\n>>\n>> ==========================\n>> And it seams as if zlib is the limitation here.\n>> Unless we include the zlib source code into Git and redefine uLong,\n>> is there a nice way around this:\n>> ===========================\n>>\n>>\n>> /usr/include/zconf.h:#  define uLong                 z_uLong\n>> /usr/include/zconf.h:#  define uLongf                z_uLongf\n>> /usr/include/zconf.h:typedef unsigned long  uLong; /* 32 bits or more */\n>> /usr/include/zconf.h:typedef uLong FAR uLongf;\n> Hmph.  Would ef49a7a0 (\"zlib: zlib can only process 4GB at a time\",\n> 2011-06-10) and e01503b5 (\"zlib: allow feeding more than 4GB in one\n> go\", 2011-06-10) help us here, though?\n>\nThat is good news.\nI tried to replace all \"unsigned long\" with size_t and got that compiling\nwithout warnings under Windows 64 bit.\n\nCompiling this on a 32 bit Linux gave lots of warnings..\n\nConverting all unsigned long into is probably an overkill.\nSome may stay, some may be converted into off_t, and some size_t.\n\nDoes anybody wants to pick this up?\n\n"},{"id":"314498","messageId":"1904675654.3064641.1489842217692.JavaMail.open-xchange@app01.ox.hosteurope.de","threadId":"45384","inReplyTo":"2ebd249b-39a4-23c2-13e3-23c91a938313@web.de","subject":"Re: Commiting files larger than 4 GB on Windows","fromName":"Thomas Braun","fromEmail":"thomas.braun@virtuell-zuhause.de","sentAt":"2017-03-18T13:03:37Z","receivedAt":"2017-03-18T14:05:16Z","isPatch":false,"sender":{"key":"thomas.braun@virtuell-zuhause.de","avatar":"https://avatars.githubusercontent.com/u/1185677?v=4"},"body":"> Torsten Bögershausen <tboegi@web.de> hat am 17. März 2017 um 06:29\n> geschrieben:\n> \n> \n> On 15/03/17 22:29, Junio C Hamano wrote:\n> > Torsten Bögershausen <tboegi@web.de> writes:\n> >\n> >> The real \"show stopper\" is at the end.\n> >> ...\n> >>\n> >> ==========================\n> >> And it seams as if zlib is the limitation here.\n> >> Unless we include the zlib source code into Git and redefine uLong,\n> >> is there a nice way around this:\n> >> ===========================\n> >>\n> >>\n> >> /usr/include/zconf.h:#  define uLong                 z_uLong\n> >> /usr/include/zconf.h:#  define uLongf                z_uLongf\n> >> /usr/include/zconf.h:typedef unsigned long  uLong; /* 32 bits or more */\n> >> /usr/include/zconf.h:typedef uLong FAR uLongf;\n> > Hmph.  Would ef49a7a0 (\"zlib: zlib can only process 4GB at a time\",\n> > 2011-06-10) and e01503b5 (\"zlib: allow feeding more than 4GB in one\n> > go\", 2011-06-10) help us here, though?\n> >\n> That is good news.\n> I tried to replace all \"unsigned long\" with size_t and got that compiling\n> without warnings under Windows 64 bit.\n> \n> Compiling this on a 32 bit Linux gave lots of warnings..\n> \n> Converting all unsigned long into is probably an overkill.\n> Some may stay, some may be converted into off_t, and some size_t.\n> \n> Does anybody wants to pick this up?\n\nI'd be interested, altough I can't promise to get it done in the near future.\n"}]}