)]}'
{
  "commit": "8f6aed71d27f33096449d28c4711d3b68159632e",
  "tree": "ea22a61b45c813d259efe75d63f00db77d3ede2a",
  "parents": [
    "1644c73c6d4fe35d4d3304b9c03c9586de51626f"
  ],
  "author": {
    "name": "Johannes Schindelin",
    "email": "johannes.schindelin@gmx.de",
    "time": "Wed Apr 25 14:29:04 2018 +0200"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Thu Apr 26 12:28:43 2018 +0900"
  },
  "message": "rebase: introduce the --rebase-merges option\n\nOnce upon a time, this here developer thought: wouldn\u0027t it be nice if,\nsay, Git for Windows\u0027 patches on top of core Git could be represented as\na thicket of branches, and be rebased on top of core Git in order to\nmaintain a cherry-pick\u0027able set of patch series?\n\nThe original attempt to answer this was: git rebase --preserve-merges.\n\nHowever, that experiment was never intended as an interactive option,\nand it only piggy-backed on git rebase --interactive because that\ncommand\u0027s implementation looked already very, very familiar: it was\ndesigned by the same person who designed --preserve-merges: yours truly.\n\nSome time later, some other developer (I am looking at you, Andreas!\n;-)) decided that it would be a good idea to allow --preserve-merges to\nbe combined with --interactive (with caveats!) and the Git maintainer\n(well, the interim Git maintainer during Junio\u0027s absence, that is)\nagreed, and that is when the glamor of the --preserve-merges design\nstarted to fall apart rather quickly and unglamorously.\n\nThe reason? In --preserve-merges mode, the parents of a merge commit (or\nfor that matter, of *any* commit) were not stated explicitly, but were\n*implied* by the commit name passed to the `pick` command.\n\nThis made it impossible, for example, to reorder commits. Not to mention\nto move commits between branches or, deity forbid, to split topic branches\ninto two.\n\nAlas, these shortcomings also prevented that mode (whose original\npurpose was to serve Git for Windows\u0027 needs, with the additional hope\nthat it may be useful to others, too) from serving Git for Windows\u0027\nneeds.\n\nFive years later, when it became really untenable to have one unwieldy,\nbig hodge-podge patch series of partly related, partly unrelated patches\nin Git for Windows that was rebased onto core Git\u0027s tags from time to\ntime (earning the undeserved wrath of the developer of the ill-fated\ngit-remote-hg series that first obsoleted Git for Windows\u0027 competing\napproach, only to be abandoned without maintainer later) was really\nuntenable, the \"Git garden shears\" were born [*1*/*2*]: a script,\npiggy-backing on top of the interactive rebase, that would first\ndetermine the branch topology of the patches to be rebased, create a\npseudo todo list for further editing, transform the result into a real\ntodo list (making heavy use of the `exec` command to \"implement\" the\nmissing todo list commands) and finally recreate the patch series on\ntop of the new base commit.\n\nThat was in 2013. And it took about three weeks to come up with the\ndesign and implement it as an out-of-tree script. Needless to say, the\nimplementation needed quite a few years to stabilize, all the while the\ndesign itself proved itself sound.\n\nWith this patch, the goodness of the Git garden shears comes to `git\nrebase -i` itself. Passing the `--rebase-merges` option will generate\na todo list that can be understood readily, and where it is obvious\nhow to reorder commits. New branches can be introduced by inserting\n`label` commands and calling `merge \u003clabel\u003e`. And once this mode will\nhave become stable and universally accepted, we can deprecate the design\nmistake that was `--preserve-merges`.\n\nLink *1*:\nhttps://github.com/msysgit/msysgit/blob/master/share/msysGit/shears.sh\nLink *2*:\nhttps://github.com/git-for-windows/build-extra/blob/master/shears.sh\n\nSigned-off-by: Johannes Schindelin \u003cjohannes.schindelin@gmx.de\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "dd852068b1d06f8f40566da65579564144fef718",
      "old_mode": 33188,
      "old_path": "Documentation/git-rebase.txt",
      "new_id": "7f1756f1ebaceeec39c65e087cb0f4af200e4a84",
      "new_mode": 33188,
      "new_path": "Documentation/git-rebase.txt"
    },
    {
      "type": "modify",
      "old_id": "01dd9ff07a20b7e885e8cfeba08ce7a2fecbbe02",
      "old_mode": 33188,
      "old_path": "contrib/completion/git-completion.bash",
      "new_id": "e646900409938650b10b5adaf02731a2af85e14b",
      "new_mode": 33188,
      "new_path": "contrib/completion/git-completion.bash"
    },
    {
      "type": "modify",
      "old_id": "acb4bfd3fc891d1c3803f669decb44396ae8a335",
      "old_mode": 33188,
      "old_path": "git-rebase--interactive.sh",
      "new_id": "e29da6343392d59f1999c486137b12bbb50e7382",
      "new_mode": 33188,
      "new_path": "git-rebase--interactive.sh"
    },
    {
      "type": "modify",
      "old_id": "ded5de085a87505b244b7449b1977c3779650640",
      "old_mode": 33261,
      "old_path": "git-rebase.sh",
      "new_id": "a553f969d118f561dc30df581f3990b73942510f",
      "new_mode": 33261,
      "new_path": "git-rebase.sh"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5f0febb9970012b6a46abc1a6f8678e4cd3ff9ea",
      "new_mode": 33261,
      "new_path": "t/t3430-rebase-merges.sh"
    }
  ]
}
