)]}'
{
  "commit": "2bb74b53a49f92d433057f4d560b33f1fe2f770a",
  "tree": "ab34c2711e74477c231623b005a0b53e60ef0fe0",
  "parents": [
    "bbf47568ad7e91ab0962b314c054a2da03232c72"
  ],
  "author": {
    "name": "SZEDER Gábor",
    "email": "szeder.dev@gmail.com",
    "time": "Mon Sep 16 22:54:12 2019 +0200"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Tue Sep 17 09:39:16 2019 -0700"
  },
  "message": "Test the progress display\n\n\u0027progress.c\u0027 has seen a few fixes recently [1], and, unfortunately,\nsome of those fixes required further fixes [2].  It seems it\u0027s time to\nhave a few tests focusing on the subtleties of the progress display.\n\nAdd the \u0027test-tool progress\u0027 subcommand to help testing the progress\ndisplay, reading instructions from standard input and turning them\ninto calls to the display_progress() and display_throughput()\nfunctions with the given parameters.\n\nThe progress display is, however, critically dependent on timing,\nbecause it\u0027s only updated once every second or, if the toal is known\nin advance, every 1%, and there is the throughput rate as well.  These\nmake the progress display far too undeterministic for testing as-is.\nTo address this, add a few testing-specific variables and functions to\n\u0027progress.c\u0027, allowing the the new test helper to:\n\n  - Disable the triggered-every-second SIGALRM and set the\n    \u0027progress_update\u0027 flag explicitly based in the input instructions.\n    This way the progress line will be updated deterministically when\n    the test wants it to be updated.\n\n  - Specify the time elapsed since start_progress() to make the\n    throughput rate calculations deterministic.\n\nAdd the new test script \u0027t0500-progress-display.sh\u0027 to check a few\nsimple cases with and without throughput, and that a shorter progress\nline properly covers up the previously displayed line in different\nsituations.\n\n[1] See commits 545dc345eb (progress: break too long progress bar\n    lines, 2019-04-12) and 9f1fd84e15 (progress: clear previous\n    progress update dynamically, 2019-04-12).\n[2] 1aed1a5f25 (progress: avoid empty line when breaking the progress\n    line, 2019-05-19)\n\nSigned-off-by: SZEDER Gábor \u003cszeder.dev@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f9255344ae5009a192ab83a332be749632d94531",
      "old_mode": 33188,
      "old_path": "Makefile",
      "new_id": "a83532e29dfa218d4c41bf563cb9f0972c0b272a",
      "new_mode": 33188,
      "new_path": "Makefile"
    },
    {
      "type": "modify",
      "old_id": "0eddf1804dc178d6f648fbecf28e87c4771f12f6",
      "old_mode": 33188,
      "old_path": "progress.c",
      "new_id": "0063559aab6e233abd0a69aef6cead9d01e39948",
      "new_mode": 33188,
      "new_path": "progress.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4e9f7fafdfb0ecabcb7f8cd48f371be3cf088c6c",
      "new_mode": 33188,
      "new_path": "t/helper/test-progress.c"
    },
    {
      "type": "modify",
      "old_id": "ce7e89028c4a7cc328998b0acfd42ec983cd7a74",
      "old_mode": 33188,
      "old_path": "t/helper/test-tool.c",
      "new_id": "19ee26d931d9fb5cff2e4b2d0de55b503daaf571",
      "new_mode": 33188,
      "new_path": "t/helper/test-tool.c"
    },
    {
      "type": "modify",
      "old_id": "f805bb39ae9e2ebe83ecb4e52f953fbcb43ce444",
      "old_mode": 33188,
      "old_path": "t/helper/test-tool.h",
      "new_id": "c2aa56ef50d90fc61db8720bbbc9955264036b73",
      "new_mode": 33188,
      "new_path": "t/helper/test-tool.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "24ccbd8d3b1e6d8dd3c153e3ceec0d8809b61dd4",
      "new_mode": 33261,
      "new_path": "t/t0500-progress-display.sh"
    }
  ]
}
