)]}'
{
  "commit": "8f06b88ae597650c4c74d0fc0e18dc9245fa9b59",
  "tree": "ea0e1b62b30a00aab77d50f47ea3fa28286ffa98",
  "parents": [
    "646eaceddd63fc72012529e2d40166562b883320"
  ],
  "author": {
    "name": "Harald Nordgren",
    "email": "haraldnordgren@gmail.com",
    "time": "Mon Jul 20 08:27:02 2026 +0000"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Wed Jul 29 10:36:55 2026 -0700"
  },
  "message": "history: add squash subcommand to fold a range\n\nFolding a series of commits into one required either an interactive\nrebase where each commit after the first was hand-edited to \"fixup\", or\na \"git reset --soft\" to the merge base followed by \"git commit --amend\".\n\nAdd \"git history squash \u003crevision-range\u003e\" to do this directly. It folds\nevery commit in the range into the oldest one, keeping that commit\u0027s\nauthorship and taking the tree of the newest commit, then replays the\ncommits above the range on top. The squashed message comes from the\noldest commit by default, or from the body of the last amend! commit\ntargeting it. An editor opens with the selected message when\n--reedit-message is given. A fixup!, squash! or amend! commit is refused\nunless the commit it targets is also in the range, so the fold does not\nsilently absorb a marker meant for a commit outside it. The check runs\nthe range through todo_list_rearrange_squash(), which leaves such a\nmarker as a plain pick. Markers whose target is in the range fold in as\nusual. As an exception, a range made up entirely of markers for one\ntarget is combined anyway, taking its message from the last amend! if\nthere is one, so a batch of fixups for the same commit can be collapsed.\n\nThe range is read like the arguments to \"git rev-list\", so several\nrevisions such as \"HEAD~3..HEAD ^topic\" may be given, and rev-list\noptions are accepted too. As \"git replay\" does, the walk options the fold\nrelies on are forced after setup_revisions() and a warning is printed if\nan option changed them, so the first commit returned is the range\u0027s\noldest and its parent is the base regardless of what the user passed\n(including after a \"--\"). A merge inside the range is folded when its\nother parent is reachable from the base, otherwise the range has more\nthan one base and is rejected. By default the command also refuses when a\nref points at a commit that the fold would discard. Use --update-refs\u003dhead\nto rewrite only the current branch instead.\n\nInspired-by: Sergey Chernov \u003cserega.morph@gmail.com\u003e\nSigned-off-by: Harald Nordgren \u003charaldnordgren@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "81f80a927451236daf33a4e67d0f5f412f474f7b",
      "old_mode": 33188,
      "old_path": "Documentation/config/advice.adoc",
      "new_id": "e2a348777837c1d927ae0b0334f5b39440a5a29b",
      "new_mode": 33188,
      "new_path": "Documentation/config/advice.adoc"
    },
    {
      "type": "modify",
      "old_id": "28b477cd378150ac45a202acb7e92011045933d2",
      "old_mode": 33188,
      "old_path": "Documentation/git-history.adoc",
      "new_id": "e1e930f355e89cc680e812b42426c861586c9777",
      "new_mode": 33188,
      "new_path": "Documentation/git-history.adoc"
    },
    {
      "type": "modify",
      "old_id": "63bf8b0c5f048122f9577d6417b0c935c49c603a",
      "old_mode": 33188,
      "old_path": "advice.c",
      "new_id": "401d0473917cd9c81bb2c5694fe6ec51911e1500",
      "new_mode": 33188,
      "new_path": "advice.c"
    },
    {
      "type": "modify",
      "old_id": "66f6cd6a772d8cd74f0bfa372afad9108a4f3e25",
      "old_mode": 33188,
      "old_path": "advice.h",
      "new_id": "3f0b4f0485c7feb8655a31a2f6689bd1f17d5348",
      "new_mode": 33188,
      "new_path": "advice.h"
    },
    {
      "type": "modify",
      "old_id": "b592b98393c640db5da7a6cabd21a8c9a14b8823",
      "old_mode": 33188,
      "old_path": "builtin/history.c",
      "new_id": "423c8beaaf79a1b6e50149b49e251768010dd7e7",
      "new_mode": 33188,
      "new_path": "builtin/history.c"
    },
    {
      "type": "modify",
      "old_id": "8ae6ab6c5fe1e2f994a9e4ab124784be43bcaba9",
      "old_mode": 33188,
      "old_path": "t/meson.build",
      "new_id": "89cff164054b3d01a7c7d1520fa0cf5f40d4c923",
      "new_mode": 33188,
      "new_path": "t/meson.build"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "9c362f309442bea8ba3b7c33857ee0dcec458466",
      "new_mode": 33261,
      "new_path": "t/t3455-history-squash.sh"
    }
  ]
}
