"use strict";(()=>{var e={};e.id=1724,e.ids=[1724],e.modules={85890:e=>{e.exports=require("better-sqlite3")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},61282:e=>{e.exports=require("child_process")},84770:e=>{e.exports=require("crypto")},92048:e=>{e.exports=require("fs")},19801:e=>{e.exports=require("os")},55315:e=>{e.exports=require("path")},21764:e=>{e.exports=require("util")},64953:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>f,patchFetch:()=>k,requestAsyncStorage:()=>l,routeModule:()=>x,serverHooks:()=>g,staticGenerationAsyncStorage:()=>w});var o={};r.r(o),r.d(o,{GET:()=>c});var s=r(49303),i=r(88716),a=r(60670),n=r(87070),u=r(94925),p=r(30721),m=r(46155),d=r(32253),h=r(39798);async function c(e,{params:t}){try{if(!(0,m.m$)(t.id))return n.NextResponse.json({error:"Invalid worktree ID format"},{status:400});if(!h.S.test(t.commitHash))return n.NextResponse.json({error:"Invalid commit hash format"},{status:400});let e=(0,u.getDbInstance)(),r=(0,p.gU)(e,t.id);if(!r)return n.NextResponse.json({error:"Worktree not found"},{status:404});let o=await (0,d.aP)(r.path,t.commitHash);if(!o)return n.NextResponse.json({error:"Commit not found"},{status:404});return n.NextResponse.json(o,{status:200})}catch(e){return(0,d.Vt)(e,"GET /api/worktrees/:id/git/show/:hash")}}let x=new s.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/worktrees/[id]/git/show/[commitHash]/route",pathname:"/api/worktrees/[id]/git/show/[commitHash]",filename:"route",bundlePath:"app/api/worktrees/[id]/git/show/[commitHash]/route"},resolvedPagePath:"/home/runner/work/CommandMate/CommandMate/src/app/api/worktrees/[id]/git/show/[commitHash]/route.ts",nextConfigOutput:"",userland:o}),{requestAsyncStorage:l,staticGenerationAsyncStorage:w,serverHooks:g}=x,f="/api/worktrees/[id]/git/show/[commitHash]/route";function k(){return(0,a.patchFetch)({serverHooks:g,staticGenerationAsyncStorage:w})}}};var t=require("../../../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),o=t.X(0,[8948,5972,3895,4925,721,9922],()=>r(64953));module.exports=o})();