)]}'
{
  "commit": "bbf47568ad7e91ab0962b314c054a2da03232c72",
  "tree": "8f37e5f8d8fea33e07dd48d856211263a44d7777",
  "parents": [
    "5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9"
  ],
  "author": {
    "name": "SZEDER Gábor",
    "email": "szeder.dev@gmail.com",
    "time": "Mon Sep 16 22:54:11 2019 +0200"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Tue Sep 17 09:39:16 2019 -0700"
  },
  "message": "Revert \"progress: use term_clear_line()\"\n\nThis reverts commit 5b12e3123b (progress: use term_clear_line(),\n2019-06-24), because covering up the entire last line while refreshing\nthe progress line caused unexpected problems during \u0027git\nclone/fetch/push\u0027:\n\n  $ git clone ssh://localhost/home/szeder/src/tmp/linux.git/\n  Cloning into \u0027linux\u0027...\n  remote:\n  remote:\n  remote:\n  remote: Enumerating objects: 999295\n\nThe length of the progress bar line can shorten when it includes\nthroughput and the unit changes, or when its length exceeds the width\nof the terminal and is broken into two lines.  In these cases the\npreviously displayed longer progress line should be covered up,\nbecause otherwise the leftover characters from the previous progress\nline make the output look weird [1].  term_clear_line() makes this\nquite simple, as it covers up the entire last line either by using an\nANSI control sequence or by printing a terminal width worth of space\ncharacters, depending on whether the terminal is smart or dumb.\n\nUnfortunately, when accessing a remote repository via any non-local\nprotocol the remote \u0027git receive-pack/upload-pack\u0027 processes can\u0027t\npossibly have any idea about the local terminal (smart of dumb? how\nwide?) their progress will end up on.  Consequently, they assume the\nworst, i.e. standard-width dumb terminal, and print 80 spaces to cover\nup the previously displayed progress line.  The local \u0027git\nclone/fetch/push\u0027 processes then display the remote\u0027s progress,\nincluding these coverup spaces, with the \u0027remote: \u0027 prefix, resulting\nin a total line length of 88 characters.  If the local terminal is\nnarrower than that, then the coverup gets line-wrapped, and after that\nthe CR at the end doesn\u0027t return to the beginning of the progress\nline, but to the first column of its last line, resulting in those\nrepeated \u0027remote: \u003cmany-spaces\u003e\u0027 lines.\n\nBy reverting 5b12e3123b (progress: use term_clear_line(),\n2019-06-24) we won\u0027t cover up the entire last line, but go back to\ncomparing the length of the current progress bar line with the\nprevious one, and cover up as many characters as needed.\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\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": "277db8afa26decf0d95a44663f477257213a48f6",
      "old_mode": 33188,
      "old_path": "progress.c",
      "new_id": "0eddf1804dc178d6f648fbecf28e87c4771f12f6",
      "new_mode": 33188,
      "new_path": "progress.c"
    },
    {
      "type": "modify",
      "old_id": "b86ddb60f2ea6ec1c177b8be5d056d064a1d7697",
      "old_mode": 33261,
      "old_path": "t/t5541-http-push-smart.sh",
      "new_id": "92bac4325733e270133b270095f213c9db0a0108",
      "new_mode": 33261,
      "new_path": "t/t5541-http-push-smart.sh"
    }
  ]
}
