)]}'
{
  "commit": "5d4d1440ba992fe27b00f8a56862543bb27561e2",
  "tree": "90fe318df08eb03c6ddcb452c1d34f9af8ddf249",
  "parents": [
    "21e047dcadaffc09cfc958e9014e84bf2237bfe8"
  ],
  "author": {
    "name": "Stefan Beller",
    "email": "stefanbeller@googlemail.com",
    "time": "Sat Aug 03 13:51:25 2013 +0200"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Wed Aug 07 08:37:02 2013 -0700"
  },
  "message": "checkout-index: fix negations of even numbers of -n\n\nThe --no-create was parsed with OPT_BOOLEAN, which has a counting up\nlogic implemented. Since b04ba2bb (parse-options: deprecate OPT_BOOLEAN,\n2011-09-27) the OPT_BOOLEAN is deprecated and is only a define:\n\t/* Deprecated synonym */\n\t#define OPTION_BOOLEAN OPTION_COUNTUP\n\nHowever the variable not_new, which can be counted up by giving\n--no-create multiple times, is used to set a bit in the struct checkout\nbitfield (defined in cache.h:969, declared at builtin/checkout-index.c:19):\n\n\tstate.not_new \u003d not_new;\n\nWhen assigning a value other than 0 or 1 to a bit, all leading digits but\nthe last are ignored and only the last bit is used for setting the bit\nvariable.\n\nHence the following:\n\t# in git.git:\n\t$ git status\n\t# working directory clean\n\trm COPYING\n\t$ git status\n\t# deleted:    COPYING\n\t$ git checkout-index -a -n\n\t$ git status\n\t# deleted:    COPYING\n\t# which is expected as we\u0027re telling git to not restore or create\n\t# files, however:\n\t$ git checkout-index -a -n -n\n\t$ git status\n\t# working directory clean, COPYING is restored again!\n\t# That\u0027s the bug, we\u0027re fixing here.\n\nBy restraining the variable not_new to a value being definitely 0 or 1\nby the macro OPT_BOOL the bug is fixed.\n\nSigned-off-by: Stefan Beller \u003cstefanbeller@googlemail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "aa922edf94f612240a9de4345a82e24718eefbe1",
      "old_mode": 33188,
      "old_path": "builtin/checkout-index.c",
      "new_id": "69e167b16c284534d84019ba0f781fe2c3a889dd",
      "new_mode": 33188,
      "new_path": "builtin/checkout-index.c"
    }
  ]
}
