The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 07:15 UTC
fix(server): fetch failures from a broken local ref say so (#38853)
Julius Marminge committed
Nov 18, 2026 at 19:18 UTC
99be1f6601f98bb33b04b740c49ac2e2c938efe0
2 files changed
+8
apps/server/src/vcs/GitVcsDriverCore.test.ts
+5
@@ -2001,6 +2001,11 @@ it.effect.each([
2001
expected: "could not update a local reference",
2002
attempts: 2,
2003
},
2004
+ {
2005
+ name: "broken local ref",
2006
+ stderr: "fatal: bad object refs/remotes/origin/dev 2",
2007
+ expected: "broken local ref",
2008
+ },
2009
{
2010
name: "unrelated remote chatter",
2011
stderr:
apps/server/src/vcs/GitVcsDriverCore.ts
+3
@@ -686,6 +686,9 @@ function fetchFailureDetail(stderr: string): string | undefined {
686
if (isRefLockFailure(stderr)) {
687
return "Git could not update a local reference. Another Git operation or a stale lock may be blocking the fetch; check the repository on the server, then retry.";
688
}
689
+ if (lines.some((line) => /^fatal: bad object refs\//i.test(line))) {
690
+ return "Git found a broken local ref. Check the local repository on the server for a damaged or stray ref, then retry.";
691
+ }
692
return undefined;
693
}
694