)]}'
{
  "commit": "c5848f3cb9753e94feddc04b8910b4ff113a458c",
  "tree": "8b3eb330c645e4f020a9ef7f10e78491474ec8ab",
  "parents": [
    "6e4636006501be61b940388381cd75a8ad00e6b5"
  ],
  "author": {
    "name": "Josh Bleecher Snyder",
    "email": "josharian@gmail.com",
    "time": "Wed May 28 18:50:58 2025 +0000"
  },
  "committer": {
    "name": "Josh Bleecher Snyder",
    "email": "josharian@gmail.com",
    "time": "Wed May 28 12:01:29 2025 -0700"
  },
  "message": "loop: use repo root instead of working directory for git diff support\n\nChange all git HTTP endpoints to use RepoRoot() instead of WorkingDir()\nto resolve failures when sketch is started from different directories than\nwhere the Docker container was created.\n\nThe issue occurred because:\n- WorkingDir() returns current working directory (could be /app/subdir)\n- Git tools need repository root directory (/app) for relative file paths\n- When Docker sets working directory to subdirectory, git operations fail\n\nChanges include:\n\n1. Added RepoRoot() method to Agent and CodingAgent interface:\n   - Returns a.repoRoot (the git repository root directory)\n   - Complements existing WorkingDir() method\n\n2. Updated all git HTTP endpoints to use RepoRoot():\n   - handleGitCat: fixes GitCat file access from subdirectories\n   - handleGitRawDiff: ensures diff operations work correctly\n   - handleGitShow: ensures show operations work correctly\n   - handleGitSave: ensures file saving works correctly\n   - handleGitRecentLog: ensures log operations work correctly\n\nThe fix ensures git ls-files and other git operations work reliably\nregardless of which directory sketch was started from, resolving the\nreported GitCat directory issue where files couldn\u0027t be found when\nstarting sketch from different locations.\n\nTesting confirmed GitCat now works correctly when repository root is\nused instead of working directory, and git operations succeed from\nany starting directory.\n\nFixes #119\n\nCo-Authored-By: sketch \u003chello@sketch.dev\u003e\nChange-ID: sb73dac311df0c78dk",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c8891cd6e99fcc7579d69d30aa66a213e7a54b6d",
      "old_mode": 33188,
      "old_path": "loop/agent.go",
      "new_id": "273964f24e4381b56a0601dea4158cfde3720ba4",
      "new_mode": 33188,
      "new_path": "loop/agent.go"
    },
    {
      "type": "modify",
      "old_id": "ede1644acc9321feb67876a89c66b5ead68c9020",
      "old_mode": 33188,
      "old_path": "loop/server/loophttp.go",
      "new_id": "0e0d9305a2de51a5d3604ac792e99a22c48e2dbd",
      "new_mode": 33188,
      "new_path": "loop/server/loophttp.go"
    },
    {
      "type": "modify",
      "old_id": "949a95adce479c272785bb533b5f707264ea15fe",
      "old_mode": 33188,
      "old_path": "loop/server/loophttp_test.go",
      "new_id": "58d8ad0ca723c9167c4921556238737592e56f53",
      "new_mode": 33188,
      "new_path": "loop/server/loophttp_test.go"
    }
  ]
}
