)]}'
{
  "commit": "d48e5e21da980c6d439655a1292d0332b341c7d1",
  "tree": "d3bc7c9e24f36fce1f3a0e1b36f38708fe2993e3",
  "parents": [
    "a9ae8fde2eb0c00723d850ba23ea8401864fab83"
  ],
  "author": {
    "name": "Elijah Newren",
    "email": "newren@gmail.com",
    "time": "Sat Feb 15 21:36:24 2020 +0000"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Sun Feb 16 15:40:42 2020 -0800"
  },
  "message": "rebase (interactive-backend): make --keep-empty the default\n\nDifferent rebase backends have different treatment for commits which\nstart empty (i.e. have no changes relative to their parent), and the\n--keep-empty option was added at some point to allow adjusting behavior.\nThe handling of commits which start empty is actually quite similar to\ncommit b00bf1c9a8dd (git-rebase: make --allow-empty-message the default,\n2018-06-27), which pointed out that the behavior for various backends is\noften more happenstance than design.  The specific change made in that\ncommit is actually quite relevant as well and much of the logic there\ndirectly applies here.\n\nIt makes a lot of sense in \u0027git commit\u0027 to error out on the creation of\nempty commits, unless an override flag is provided.  However, once\nsomeone determines that there is a rare case that merits using the\nmanual override to create such a commit, it is somewhere between\nannoying and harmful to have to take extra steps to keep such\nintentional commits around.  Granted, empty commits are quite rare,\nwhich is why handling of them doesn\u0027t get considered much and folks tend\nto defer to existing (accidental) behavior and assume there was a reason\nfor it, leading them to just add flags (--keep-empty in this case) that\nallow them to override the bad defaults.  Fix the interactive backend so\nthat --keep-empty is the default, much like we did with\n--allow-empty-message.  The am backend should also be fixed to have\n--keep-empty semantics for commits that start empty, but that is not\nincluded in this patch other than a testcase documenting the failure.\n\nNote that there was one test in t3421 which appears to have been written\nexpecting --keep-empty to not be the default as correct behavior.  This\ntest was introduced in commit 00b8be5a4d38 (\"add tests for rebasing of\nempty commits\", 2013-06-06), which was part of a series focusing on\nrebase topology and which had an interesting original cover letter at\nhttps://lore.kernel.org/git/1347949878-12578-1-git-send-email-martinvonz@gmail.com/\nwhich noted\n    Your input especially appreciated on whether you agree with the\n    intent of the test cases.\nand then went into a long example about how one of the many tests added\nhad several questions about whether it was correct.  As such, I believe\nmost the tests in that series were about testing rebase topology with as\nmany different flags as possible and were not trying to state in general\nhow those flags should behave otherwise.\n\nSigned-off-by: Elijah Newren \u003cnewren@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c83be7ffc201f2014c89948343c58146235d0ba9",
      "old_mode": 33188,
      "old_path": "Documentation/git-rebase.txt",
      "new_id": "1d19542d79fad5b1d249e3ae8f8c1add26a70663",
      "new_mode": 33188,
      "new_path": "Documentation/git-rebase.txt"
    },
    {
      "type": "modify",
      "old_id": "faa4e0d4065f411d68f5521841827f830289e8e3",
      "old_mode": 33188,
      "old_path": "builtin/rebase.c",
      "new_id": "537b3241ce331c03d3bc4453056c513e037210e8",
      "new_mode": 33188,
      "new_path": "builtin/rebase.c"
    },
    {
      "type": "modify",
      "old_id": "aa18ae82b724812ea0b2939842395ac78f77bab1",
      "old_mode": 33188,
      "old_path": "rebase-interactive.c",
      "new_id": "7e7b4061bfb133c082b145c337416cfa61de0983",
      "new_mode": 33188,
      "new_path": "rebase-interactive.c"
    },
    {
      "type": "modify",
      "old_id": "44dbb06311a84168d8a5970267a14ade85671a98",
      "old_mode": 33188,
      "old_path": "rebase-interactive.h",
      "new_id": "05354ca3417d5841deef5b35af9527cf1581a446",
      "new_mode": 33188,
      "new_path": "rebase-interactive.h"
    },
    {
      "type": "modify",
      "old_id": "b9dbf1adb078188a0163ad8ae29cce92c0587b88",
      "old_mode": 33188,
      "old_path": "sequencer.c",
      "new_id": "c21fc202b1c58987389396b3143acad757ad8543",
      "new_mode": 33188,
      "new_path": "sequencer.c"
    },
    {
      "type": "modify",
      "old_id": "9f9ae291e3c4ad8bc30abc3c68e18e413df9b6f6",
      "old_mode": 33188,
      "old_path": "sequencer.h",
      "new_id": "c165e0ff254c16f6a5d006fe03f88d5bd8b3c715",
      "new_mode": 33188,
      "new_path": "sequencer.h"
    },
    {
      "type": "modify",
      "old_id": "325072b0a33e10ad44c3d3d561e207b2a03a13a6",
      "old_mode": 33261,
      "old_path": "t/t3421-rebase-topology-linear.sh",
      "new_id": "57334dca7e4a303752f5674a406930d10cfede87",
      "new_mode": 33261,
      "new_path": "t/t3421-rebase-topology-linear.sh"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3b716e980e7fc4ded7e3f9ab462167e674e48f58",
      "new_mode": 33261,
      "new_path": "t/t3424-rebase-empty.sh"
    },
    {
      "type": "modify",
      "old_id": "bec48e6a1f99a5d5db91b392987ff5b64cf16781",
      "old_mode": 33261,
      "old_path": "t/t3427-rebase-subtree.sh",
      "new_id": "8dceef61cff2530ff5c403e00829a207fd24906d",
      "new_mode": 33261,
      "new_path": "t/t3427-rebase-subtree.sh"
    }
  ]
}
