// @bun
import"./chunk-bqh4yh6g.js";import{spawn as H}from"child_process";async function F(D,A){return new Promise((B,q)=>{let k=H("git",D,{stdio:"pipe",cwd:A}),C="",E="";k.stdout?.on("data",(z)=>C+=z.toString()),k.stderr?.on("data",(z)=>E+=z.toString()),k.on("close",(z)=>{if(z===0)B(C);else q(Error(E||`git exited with code ${z}`))}),k.on("error",q)})}async function K(D,A,B){for(let q of D){let k=q.path.replace(/^\.\//,"").replace(/^\/+/,"");try{if(await F(["show",`${A}:${k}`],B)!==q.content)return!0;continue}catch{}try{if(await F(["show",`origin/${A}:${k}`],B)!==q.content)return!0;continue}catch{return!0}}return!1}export{K as hasBranchDifferences};

//# debugId=A4F6721A1A2DF60064756E2164756E21
