)]}'
{
  "commit": "5e227dd8f494194284b4b545c02e09bc79909d41",
  "tree": "cbe3fb6cb160fea4379e822fcca2cfcbe5bc51cf",
  "parents": [
    "e8d6b80c8804353641c0d999d1897e29b068bbdc"
  ],
  "author": {
    "name": "Philip Zeyliger",
    "email": "philip.zeyliger@gmail.com",
    "time": "Mon Apr 21 15:55:29 2025 -0700"
  },
  "committer": {
    "name": "Philip Zeyliger",
    "email": "philip.zeyliger@gmail.com",
    "time": "Mon Apr 21 20:04:53 2025 -0700"
  },
  "message": "sketch: Linux support\n\nTogether with 8a89e1cbd3e7c9bbe1c561e88141527a0c894e06, this\nshould resolve https://github.com/boldsoftware/sketch/issues/3,\nin supporting Linux.\n\nTo test on a Mac, run \"limactl shell default go run ./cmd/sketch -verbose\", assuming\nyou have a lima default VM with sketch\u0027s dependencies already prepped.\n\nThe issues we encountered were:\n\n1. Explicit checks for \"is Colima installed\", \"is docker installed\",\n   etc. Easy enough to fix these.\n\n2. When go\u0027s toolchain builds, it puts the output in different places\n   depending whether it\u0027s cross-compiled or not. Fine, we adapt.\n   Note that os.Rename() doesn\u0027t always work, and we fall back to\n   copy/delete. Mode has to be set appropriately to, to make the\n   /bin/sketch executable executable.\n\n   Re-building is kind of silly: we could use /proc/self/exe, for\n   example, or cross-mount the binary into the container, or any\n   number of other things. That said, here we keep the paths the same.\n\n3. Docker networking setup for the git server. The host git repo\n   is served with git\u0027s cgi-bin wrapper. host.docker.internal\n   seems to work different in colima vs Ubuntu\u0027s docker.io, so\n   an extra command line flag to docker was added. Then,\n   it turns out that our git server checks that the remote is\n   127.0.0.1, which seems to be how Colima does its networking,\n   but isn\u0027t the case for Docker in general. To handle this, we\n   use HTTP Basic Auth with a random password. (Git also has\n   an \"http.extraHeader\" configuration, but basic auth seems just\n   as good and more obvious.)\n\nIncidentally, I\u0027m also adding the git remote as a git remote\nnamed \"sketch-host\" to make it easier to work with in the terminal,\nif necessary.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "19bb8036755efde3de7764461bc6825c8681545c",
      "old_mode": 33188,
      "old_path": "cmd/sketch/main.go",
      "new_id": "b7f9fd3f5781a512759fb4ebbb052e3084d94278",
      "new_mode": 33188,
      "new_path": "cmd/sketch/main.go"
    },
    {
      "type": "modify",
      "old_id": "9a8511ed6c88325c9483022bc391ff3c07f7aa32",
      "old_mode": 33188,
      "old_path": "cmd/sketch/reqchecks.go",
      "new_id": "2b68adc51b23d8cbb0af848016fe6059b94c9d75",
      "new_mode": 33188,
      "new_path": "cmd/sketch/reqchecks.go"
    },
    {
      "type": "modify",
      "old_id": "481d24e3140ccd8bb9bcd4deef3fdfd6cd36fc07",
      "old_mode": 33188,
      "old_path": "dockerimg/dockerimg.go",
      "new_id": "039c84de43603d8c12964666ab4b8394959ba5c7",
      "new_mode": 33188,
      "new_path": "dockerimg/dockerimg.go"
    },
    {
      "type": "modify",
      "old_id": "d618ab677601a79ed11b96c49a04935d92f3339c",
      "old_mode": 33188,
      "old_path": "dockerimg/githttp.go",
      "new_id": "6f0ec55c1e8fe5911c556de39fc2a6a0d9802fbd",
      "new_mode": 33188,
      "new_path": "dockerimg/githttp.go"
    }
  ]
}
