Commit676be75unknown_key
fix(git): correct route param destructure (Hono 4.x returns 'repo.git' not 'repo')
fix(git): correct route param destructure (Hono 4.x returns 'repo.git' not 'repo') Restores intended route-param extraction. Hono 4.x preserves the full segment including the literal '.git', so destructuring must use the bracket-string form. Runtime was silently broken - clone/push calls were receiving undefined for the repo name. Clears 4 tsc errors from src/routes/git.ts; 821/821 tests still pass. https://claude.ai/code/session_0155D2jj2kJXaMEnyJhRpRLg
1 file changed+4−4676be75589570eefbae2f1ba8e662a8196982af5
1 changed file+4−4
Modifiedsrc/routes/git.ts+4−4View fileUnifiedSplit
@@ -15,7 +15,7 @@ const git = new Hono();
1515
1616// Discovery: GET /:owner/:repo.git/info/refs?service=...
1717git.get("/:owner/:repo.git/info/refs", async (c) => {
18 const { owner, repo } = c.req.param();
18 const { owner, "repo.git": repo } = c.req.param();
1919 const service = c.req.query("service");
2020
2121 if (!service || !["git-upload-pack", "git-receive-pack"].includes(service)) {
@@ -31,7 +31,7 @@ git.get("/:owner/:repo.git/info/refs", async (c) => {
3131
3232// GET /:owner/:repo.git/HEAD
3333git.get("/:owner/:repo.git/HEAD", async (c) => {
34 const { owner, repo } = c.req.param();
34 const { owner, "repo.git": repo } = c.req.param();
3535 if (!(await repoExists(owner, repo))) {
3636 return c.text("Repository not found", 404);
3737 }
@@ -43,7 +43,7 @@ git.get("/:owner/:repo.git/HEAD", async (c) => {
4343
4444// Upload pack (clone/fetch)
4545git.post("/:owner/:repo.git/git-upload-pack", async (c) => {
46 const { owner, repo } = c.req.param();
46 const { owner, "repo.git": repo } = c.req.param();
4747 if (!(await repoExists(owner, repo))) {
4848 return c.text("Repository not found", 404);
4949 }
@@ -57,7 +57,7 @@ git.post("/:owner/:repo.git/git-upload-pack", async (c) => {
5757
5858// Receive pack (push)
5959git.post("/:owner/:repo.git/git-receive-pack", async (c) => {
60 const { owner, repo } = c.req.param();
60 const { owner, "repo.git": repo } = c.req.param();
6161 if (!(await repoExists(owner, repo))) {
6262 return c.text("Repository not found", 404);
6363 }
6464