)]}'
{
  "commit": "0bdf93cbf0afd568384f237378ba368e751a2f0f",
  "tree": "91ba78424da9ad1b1cb54fab05b521feb892a8e5",
  "parents": [
    "6d9878cc60ba97fc99aa92f40535644938cad907"
  ],
  "author": {
    "name": "Jeff King",
    "email": "peff@peff.net",
    "time": "Tue May 13 04:46:38 2008 -0400"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Tue May 13 21:45:28 2008 -0700"
  },
  "message": "filter-branch: fix variable export logic\n\nfilter-branch tries to restore \"old\" copies of some\nenvironment variables by using the construct:\n\n  unset var\n  test -z \"$old_var\" || var\u003d\"$old_var\" \u0026\u0026 export var\n\nThis is just wrong.  AND-list and OR-list operators \u0026\u0026 and || have equal\nprecedence and they bind left to right.  The second term, var\u003d\"$old\"\nassignment always succeeds, so we always end up exporting var.\n\nOn bash and dash, exporting an unset variable has no effect. However, on\nsome shells (such as FreeBSD\u0027s /bin/sh), the shell exports the empty\nvalue.\n\nThis manifested itself in this case as git-filter-branch setting\nGIT_INDEX_FILE to the empty string, which in turn caused its call to\ngit-read-tree to fail, leaving the working tree pointing at the original\nHEAD instead of the rewritten one.\n\nTo fix this, we change the short-circuit logic to better match the intent:\n\n  test -z \"$old_var\" || {\n    var\u003d\"$old_var\" \u0026\u0026 export var\n  }\n\nSigned-off-by: Jeff King \u003cpeff@peff.net\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "333f6a8f3b783d46a0ce3b2f59bae152936cd11c",
      "old_mode": 33261,
      "old_path": "git-filter-branch.sh",
      "new_id": "80e99e539477cbd7266b19c1bd90d424cf1341ee",
      "new_mode": 33261,
      "new_path": "git-filter-branch.sh"
    }
  ]
}
