git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [ANNOUNCE] Git v2.9.1

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 12, 2016, 01:59 UTC
Message-ID
<xmqqy4577h0o.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160711235417.GA26163@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 48 quoted lines
> On Mon, Jul 11, 2016 at 11:35:05PM +0200, Andreas Schwab wrote:
>
>> Junio C Hamano <gitster@pobox.com> writes:
>> 
>> >       local_tzoffset: detect errors from tm_to_time_t
>> 
>> not ok 19 - show date (iso:5758122296 -0400)
>> #      
>> #                      echo "$time -> $expect" >expect &&
>> #                      test-date show:$format "$time" >actual &&
>> #                      test_cmp expect actual
>> #              
>> not ok 20 - show date (iso-local:5758122296 -0400)
>> #      
>> #                      echo "$time -> $expect" >expect &&
>> #                      test-date show:$format "$time" >actual &&
>> #                      test_cmp expect actual
>> 
>> This is outside the range of 32bit time_t.
>
> Yes, that's somewhat the point of the test.
>
> How does it fail for you (what does it look like with "-v")? We may be
> able to check for an outcome that matches both cases.
>
> Otherwise, we'll have to skip the test, perhaps with something like the
> patch below. I suspect the problem is actually the size of "unsigned
> long", not time_t, as we use that internally for a bunch of time
> computation.
>
> ---
> diff --git a/help.c b/help.c
> index 19328ea..0cea240 100644
> --- a/help.c
> +++ b/help.c
> @@ -419,6 +419,13 @@ int cmd_version(int argc, const char **argv, const char *prefix)
>  	 * with external projects that rely on the output of "git version".
>  	 */
>  	printf("git version %s\n", git_version_string);
> +	while (*++argv) {
> +		if (!strcmp(*argv, "--build-options")) {
> +			printf("sizeof-unsigned-long: %d",
> +			       (int)sizeof(unsigned long));
> +			/* maybe also save and output GIT-BUILD_OPTIONS? */
> +		}
> +	}
>  	return 0;
>  }

I had the same thought, except that I would have expected this to go to one of these test-* helpers, and then a lazy prereq for 64-bit time_t would be written on top of it to skip these new tests.

Show 8 quoted lines
> +build_option () {
> +	git version --build-options |
> +	sed -ne "s/^$1: //p"
> +}
> +
> +test_lazy_prereq 64BIT '
> +	test 8 -le "$(build_option sizeof-unsigned-long)"
> +'

It is somewhat disturbing that nobody seems to be regularly building on 32-bit platforms these days, which is the only reason I can think of why this was never reported until it hit a maintenance track. This should have been caught last week at f6a729f3 (Merge branch 'jk/tzoffset-fix', 2016-07-06) when the topic hit 'master' at the latest, and more preferrably it should have already been caught last month at 08ec8c5e (Merge branch 'jk/tzoffset-fix' into next, 2016-06-28).

Those who care about 32-bit builds need to start building and testing 'next' and 'master' regularly, or similar breakages are bound to continue happening X-<.

Volunteers?
Thanks.
Previous: Jeff KingNext: Jeff King
Message 8 of 56 in “[ANNOUNCE] Git v2.9.1”
  1. Junio C HamanoJul 11, 2016
  2. Andreas SchwabJul 11, 2016
  3. Jeff KingJul 11, 2016
  4. Anders KaseorgJul 12, 2016
  5. Jeff KingJul 12, 2016
  6. Eric WongJul 12, 2016
  7. Jeff KingJul 12, 2016
  8. Junio C HamanoJul 12, 2016
  9. Jeff KingJul 12, 2016
  10. Junio C HamanoJul 12, 2016
  11. Johannes SchindelinJul 12, 2016
  12. Jeff KingJul 12, 2016
  13. Johannes SchindelinJul 12, 2016
  14. Jeff KingJul 12, 2016
  15. Johannes SchindelinJul 13, 2016
  16. Junio C HamanoJul 13, 2016
  17. Johannes SchindelinJul 13, 2016
  18. Junio C HamanoJul 13, 2016
  19. Johannes SchindelinJul 14, 2016
  20. Junio C HamanoJul 12, 2016
  21. Junio C HamanoJul 13, 2016
  22. Jeff KingJul 13, 2016
  23. Junio C HamanoJul 13, 2016
  24. Johannes SchindelinJul 13, 2016
  25. Junio C HamanoJul 13, 2016
  26. Johannes SchindelinJul 14, 2016
  27. Andreas SchwabJul 14, 2016
  28. Jeff KingJul 14, 2016
  29. Johannes SchindelinJul 14, 2016
  30. Andreas SchwabJul 12, 2016
  31. Johannes SchindelinJul 12, 2016
  32. Andreas SchwabJul 12, 2016
  33. Johannes SchindelinJul 12, 2016
  34. Andreas SchwabJul 12, 2016
  35. Jeff KingJul 12, 2016
  36. Duy NguyenJul 12, 2016
  37. Johannes SchindelinJul 13, 2016
  38. Johannes SchindelinJul 13, 2016
  39. Junio C HamanoJul 12, 2016
  40. Jeff KingJul 12, 2016
  41. Junio C HamanoJul 12, 2016
  42. Jeff KingJul 12, 2016
  43. Junio C HamanoJul 12, 2016
  44. Jeff KingJul 12, 2016
  45. Junio C HamanoJul 12, 2016
  46. Johannes SchindelinJul 13, 2016
  47. Junio C HamanoJul 13, 2016
  48. Johannes SchindelinJul 13, 2016
  49. Andreas SchwabJul 12, 2016
  50. Junio C HamanoJul 13, 2016
  51. Lars SchneiderJul 14, 2016
  52. Duy NguyenJul 16, 2016
  53. 32-bit Travis, was Re: [ANNOUNCE] Git v2.9.1Johannes Schindelin, Jul 14, 2016
  54. Mike HommeyJul 14, 2016
  55. Johannes SchindelinJul 14, 2016
  56. Mike HommeyJul 15, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.