{"thread":{"id":"42644","subject":"[PATCH] archive-tar: add UL type suffix to unsigned long constant","startedAt":"2016-06-17T21:06:21Z","lastAt":"2016-06-18T01:23:02Z","messageCount":3,"participants":["Ramsay Jones","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"289512","messageId":"57646646.9060407@ramsayjones.plus.com","threadId":"42644","inReplyTo":null,"subject":"[PATCH] archive-tar: add UL type suffix to unsigned long constant","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2016-06-17T21:06:14Z","receivedAt":"2016-06-17T21:06:21Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n\nHi Jeff,\n\nIf you need to re-roll your 'jk/big-and-old-archive-tar' branch, could\nyou please squash this into the relevant patch (commit 8035a1e3,\n\"archive-tar: write extended headers for far-future mtime\", 16-06-2016).\n\nThanks!\n\nATB,\nRamsay Jones\n\n archive-tar.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/archive-tar.c b/archive-tar.c\nindex 749722f..c7b85fd 100644\n--- a/archive-tar.c\n+++ b/archive-tar.c\n@@ -187,7 +187,7 @@ static inline unsigned long ustar_size(uintmax_t size)\n \n static inline unsigned long ustar_mtime(time_t mtime)\n {\n-\tif (mtime < 077777777777)\n+\tif (mtime < 077777777777UL)\n \t\treturn mtime;\n \telse\n \t\treturn 0;\n-- \n2.9.0\n"},{"id":"289540","messageId":"20160617234041.GC26564@sigill.intra.peff.net","threadId":"42644","inReplyTo":"57646646.9060407@ramsayjones.plus.com","subject":"Re: [PATCH] archive-tar: add UL type suffix to unsigned long constant","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-06-17T23:40:41Z","receivedAt":"2016-06-17T23:40:46Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Jun 17, 2016 at 10:06:14PM +0100, Ramsay Jones wrote:\n\n> If you need to re-roll your 'jk/big-and-old-archive-tar' branch, could\n> you please squash this into the relevant patch (commit 8035a1e3,\n> \"archive-tar: write extended headers for far-future mtime\", 16-06-2016).\n> \n> Thanks!\n> \n> ATB,\n> Ramsay Jones\n> \n>  archive-tar.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/archive-tar.c b/archive-tar.c\n> index 749722f..c7b85fd 100644\n> --- a/archive-tar.c\n> +++ b/archive-tar.c\n> @@ -187,7 +187,7 @@ static inline unsigned long ustar_size(uintmax_t size)\n>  \n>  static inline unsigned long ustar_mtime(time_t mtime)\n>  {\n> -\tif (mtime < 077777777777)\n> +\tif (mtime < 077777777777UL)\n\nWhoops. I even got it right in the similar line above. :-/\n\nThis did make me wonder how the whole thing fares on a system where\n\"unsigned long\" is 32-bit (AIUI, Git for Windows is such a system).\n\nThe sizes passed around (here and all through git) are \"unsigned long\",\nso I don't think we're making anything _worse_.\n\n-Peff\n"},{"id":"289544","messageId":"5764A204.3010503@ramsayjones.plus.com","threadId":"42644","inReplyTo":"20160617234041.GC26564@sigill.intra.peff.net","subject":"Re: [PATCH] archive-tar: add UL type suffix to unsigned long constant","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2016-06-18T01:21:08Z","receivedAt":"2016-06-18T01:23:02Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 18/06/16 00:40, Jeff King wrote:\n> On Fri, Jun 17, 2016 at 10:06:14PM +0100, Ramsay Jones wrote:\n> \n>> If you need to re-roll your 'jk/big-and-old-archive-tar' branch, could\n>> you please squash this into the relevant patch (commit 8035a1e3,\n>> \"archive-tar: write extended headers for far-future mtime\", 16-06-2016).\n>>\n>> Thanks!\n>>\n>> ATB,\n>> Ramsay Jones\n>>\n>>  archive-tar.c | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/archive-tar.c b/archive-tar.c\n>> index 749722f..c7b85fd 100644\n>> --- a/archive-tar.c\n>> +++ b/archive-tar.c\n>> @@ -187,7 +187,7 @@ static inline unsigned long ustar_size(uintmax_t size)\n>>  \n>>  static inline unsigned long ustar_mtime(time_t mtime)\n>>  {\n>> -\tif (mtime < 077777777777)\n>> +\tif (mtime < 077777777777UL)\n> \n> Whoops. I even got it right in the similar line above. :-/\n> \n> This did make me wonder how the whole thing fares on a system where\n> \"unsigned long\" is 32-bit (AIUI, Git for Windows is such a system).\n> \n> The sizes passed around (here and all through git) are \"unsigned long\",\n> so I don't think we're making anything _worse_.\n\nHeh, I had exactly the same thought! ;-)\n\nI have a TODO item that reads: check odb code for object size limitations\nimposed by using 'unsigned long'. This is a known problem on Git for Windows.\n\n[Not for cygwin, however, since long is 64bit (just like linux). The win32api\nheaders on cygwin have been written in terms of a __LONG32 #define to allow\nthem to be used on LLP64 and LP64 systems.]\n\nHowever, since I don't have GFW installed, I couldn't actually test it, so ...\n\nATB,\nRamsay Jones\n\n"}]}