)]}'
{
  "commit": "ee5cbe9fd6bc02f31b4d955606288de36c3d4eab",
  "tree": "618418c1b268fdd17e98e09d7a6f96c3dcc86b66",
  "parents": [
    "66b614e29038e31745c4a5d296f64f8d64f5c377"
  ],
  "author": {
    "name": "Herbert Xu",
    "email": "herbert@gondor.apana.org.au",
    "time": "Thu Jul 07 13:58:48 2011 +0800"
  },
  "committer": {
    "name": "Herbert Xu",
    "email": "herbert@gondor.apana.org.au",
    "time": "Thu Jul 07 16:41:14 2011 +0800"
  },
  "message": "[SHELL] Optimize dash -c \"command\" to avoid a fork\n\nOn Sun, Apr 10, 2011 at 07:36:49AM +0000, Jonathan Nieder wrote:\n\u003e From: Jilles Tjoelker \u003cjilles@stack.nl\u003e\n\u003e Date: Sat, 13 Jun 2009 16:17:45 -0500\n\u003e \n\u003e This change only affects strings passed to -c, when the -s option is\n\u003e not used.\n\u003e \n\u003e Use the EV_EXIT flag to inform the eval machinery that the string\n\u003e being passed is the entirety of input.  This way, a fork may be\n\u003e omitted in many special cases.\n\u003e \n\u003e If there are empty lines after the last command, the evalcmd will not\n\u003e see the end early enough and forks will not be omitted. The same thing\n\u003e seems to happen in bash.\n\u003e \n\u003e Example:\n\u003e   sh -c \u0027ps lT\u0027\n\u003e No longer shows a shell process waiting for ps to finish.\n\u003e \n\u003e [jn: ported from FreeBSD SVN r194128.  Bugs are mine.]\n\u003e \n\u003e Signed-off-by: Jonathan Nieder \u003cjrnieder@gmail.com\u003e\n\nInstead of detecting EOF using the input layer, I\u0027m going to\nuse the parser instead.  In either case, we always have to read\nahead in order to complete the parsing of the previous node.\nTherefore we always know whether there is more to come, except\nin the case where we see a newline/semicolon or similar.\n\nFor the purposes of sh -c, this should be sufficient.\n\nSigned-off-by: Herbert Xu \u003cherbert@gondor.apana.org.au\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7367c337a0c7fbac9dd6b5544b162fa15a08b594",
      "old_mode": 33188,
      "old_path": "ChangeLog",
      "new_id": "c457fc8e8fa77210e7e6a16b56835e3d793d6720",
      "new_mode": 33188,
      "new_path": "ChangeLog"
    },
    {
      "type": "modify",
      "old_id": "ba68d55a9b58b902f8bbd6fad45f86957250e6cc",
      "old_mode": 33188,
      "old_path": "src/Makefile.am",
      "new_id": "2a37381ff689abbadffbb10cb2141ddb88d786a7",
      "new_mode": 33188,
      "new_path": "src/Makefile.am"
    },
    {
      "type": "modify",
      "old_id": "86423b44cfa3a82a44c9bc631a02f59626057efe",
      "old_mode": 33188,
      "old_path": "src/eval.c",
      "new_id": "6e7b93200cc7be11508d299200ff829f4f26dda9",
      "new_mode": 33188,
      "new_path": "src/eval.c"
    },
    {
      "type": "modify",
      "old_id": "ac394e8fc445d96d5ca9da93e7abc38f3005bb9d",
      "old_mode": 33188,
      "old_path": "src/eval.h",
      "new_id": "4e4de30410a55bbe101c9f034633402f393bb9a8",
      "new_mode": 33188,
      "new_path": "src/eval.h"
    },
    {
      "type": "modify",
      "old_id": "b38dc2759cd3239ab42f5d091181092493d94a2d",
      "old_mode": 33188,
      "old_path": "src/main.c",
      "new_id": "af987c6c33e32ca4e840a047c8ca87e340138534",
      "new_mode": 33188,
      "new_path": "src/main.c"
    },
    {
      "type": "modify",
      "old_id": "7c873af34ddd8a37ad168104daa6347d07bf731f",
      "old_mode": 33188,
      "old_path": "src/mktokens",
      "new_id": "cd52241a630eec6cdf4eeddaedb49cefd30df3cc",
      "new_mode": 33188,
      "new_path": "src/mktokens"
    },
    {
      "type": "modify",
      "old_id": "528d0052da80b80ff0b1e93c36bf13abcd50e06f",
      "old_mode": 33188,
      "old_path": "src/parser.c",
      "new_id": "6de27629b3f64fac4a747525fb63b8bd17b7f265",
      "new_mode": 33188,
      "new_path": "src/parser.c"
    },
    {
      "type": "modify",
      "old_id": "e6caed632fd854efe1726b706a48d6a05a15db20",
      "old_mode": 33188,
      "old_path": "src/parser.h",
      "new_id": "2875cce6d42419265f6152b31f1bef1973245e27",
      "new_mode": 33188,
      "new_path": "src/parser.h"
    }
  ]
}
