)]}'
{
  "commit": "b509a5ddb86a4881eb19030f321857b305901022",
  "tree": "84c8d40e7c0545c63e7a8ea56a71fa109e91f028",
  "parents": [
    "7fbc8e43ff52b6f5dc69fdd26ad7388bdac70435"
  ],
  "author": {
    "name": "Josh Bleecher Snyder",
    "email": "josharian@gmail.com",
    "time": "Fri May 23 15:49:42 2025 +0000"
  },
  "committer": {
    "name": "Josh Bleecher Snyder",
    "email": "josharian@gmail.com",
    "time": "Thu May 29 12:50:41 2025 -0700"
  },
  "message": "loop: ensure proper blank line before git commit trailers\n\nThe prepare-commit-msg hook was incorrectly adding only a single newline\nbefore trailers in some cases, resulting in missing blank lines between\nthe commit message body and trailers like Co-Authored-By and Change-ID.\n\nThis was particularly noticeable after rebasing where commit messages\nwould have:\n- Subject line\n- Single newline (no blank line)\n- Trailers\n\nThe fix improves the logic to:\n- Check if file ends with newline using tail -c 1\n- If no trailing newline: add two newlines (complete line + blank line)\n- If trailing newline exists: check if last line is empty\n- If last line has content: add one newline for blank line\n- If last line is empty: add nothing (blank line already exists)\n\nThis ensures there\u0027s always exactly one blank line before trailers,\nfollowing proper git commit message formatting conventions.\n\nCo-Authored-By: sketch \u003chello@sketch.dev\u003e\nChange-ID: s796b26b31c71b2e2k",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0a4555bc05cb2fc40d6117af70742488e47baef5",
      "old_mode": 33188,
      "old_path": "loop/agent.go",
      "new_id": "f9450ab7f34cc70d3431ef39d3cae859eaa3bf44",
      "new_mode": 33188,
      "new_path": "loop/agent.go"
    }
  ]
}
