)]}'
{
  "commit": "9d87d5ae026433a2993fdb757fc80dbdcb078310",
  "tree": "342403fcb77eb8f7945f02ab653e9c21007a9d93",
  "parents": [
    "8b966a0506f8b5aef7c6038fe518db45bc4a1852"
  ],
  "author": {
    "name": "Ævar Arnfjörð Bjarmason",
    "email": "avarab@gmail.com",
    "time": "Wed Dec 09 16:52:07 2020 +0100"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Wed Dec 09 14:16:42 2020 -0800"
  },
  "message": "pretty format %(trailers): add a \"keyonly\"\n\nAdd support for a \"keyonly\". This allows for easier parsing out of the\nkey and value. Before if you didn\u0027t want to make assumptions about how\nthe key was formatted. You\u0027d need to parse it out as e.g.:\n\n    --pretty\u003dformat:\u0027%H%x00%(trailers:separator\u003d%x00%x00)\u0027 \\\n                       \u0027%x00%(trailers:separator\u003d%x00%x00,valueonly)\u0027\n\nAnd then proceed to deduce keys by looking at those two and\nsubtracting the value plus the hardcoded \": \" separator from the\nnon-valueonly %(trailers) line. Now it\u0027s possible to simply do:\n\n    --pretty\u003dformat:\u0027%H%x00%(trailers:separator\u003d%x00%x00,keyonly)\u0027 \\\n                    \u0027%x00%(trailers:separator\u003d%x00%x00,valueonly)\u0027\n\nWhich at least reduces it to a state machine where you get N keys and\ncorrelate them with N values. Even better would be to have a way to\nchange the \": \" delimiter to something easily machine-readable (a key\nmight contain \": \" too). A follow-up change will add support for that.\n\nI don\u0027t really have a use-case for just \"keyonly\" myself. I suppose it\nwould be useful in some cases as \"key\u003d*\" matches case-insensitively,\nso a plain \"keyonly\" will give you the variants of the keys you\nmatched. I\u0027m mainly adding it to fix the inconsistency with\n\"valueonly\".\n\nSigned-off-by: Ævar Arnfjörð Bjarmason \u003cavarab@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "973b6c7d482f5a1f4a827276d280ca015f3b0399",
      "old_mode": 33188,
      "old_path": "Documentation/pretty-formats.txt",
      "new_id": "5eac36500d4685294cc270d77b849ffac387dfdd",
      "new_mode": 33188,
      "new_path": "Documentation/pretty-formats.txt"
    },
    {
      "type": "modify",
      "old_id": "7a7708a0ea707ac58f1961a65b40fa89ea8631d3",
      "old_mode": 33188,
      "old_path": "pretty.c",
      "new_id": "1237ee0e45d27ca326b8e03cf0e4652d7168f46c",
      "new_mode": 33188,
      "new_path": "pretty.c"
    },
    {
      "type": "modify",
      "old_id": "cb09a13249e9474259c349493189c587d528860c",
      "old_mode": 33261,
      "old_path": "t/t4205-log-pretty-formats.sh",
      "new_id": "4c9f6eb7946fe272731ecd05497718aaa5324acf",
      "new_mode": 33261,
      "new_path": "t/t4205-log-pretty-formats.sh"
    },
    {
      "type": "modify",
      "old_id": "d2d01015b1dd92c3e486fe7f7e99418320f8c90d",
      "old_mode": 33188,
      "old_path": "trailer.c",
      "new_id": "889b419a4f6fac85f372be0805400a42db28cfbc",
      "new_mode": 33188,
      "new_path": "trailer.c"
    },
    {
      "type": "modify",
      "old_id": "cd93e7ddea789cb6c320af2a7b984bd6f8a8215f",
      "old_mode": 33188,
      "old_path": "trailer.h",
      "new_id": "d2f28776be6f63d81f155d34b8b0f2ba6bcd39a4",
      "new_mode": 33188,
      "new_path": "trailer.h"
    }
  ]
}
