Merge remote-tracking branch 'origin/main' into fix-jj-detached-head-upstream-check
# Conflicts: # cmd/bd/sync_git_test.go
This commit is contained in:
@@ -463,6 +463,14 @@ func restoreBeadsDirFromBranch(ctx context.Context) error {
|
||||
return fmt.Errorf("no .beads directory found")
|
||||
}
|
||||
|
||||
// Skip restore when beads directory is redirected (bd-lmqhe)
|
||||
// When redirected, the beads directory is in a different repo, so
|
||||
// git checkout from the current repo won't work for paths outside it.
|
||||
redirectInfo := beads.GetRedirectInfo()
|
||||
if redirectInfo.IsRedirected {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Restore .beads/ from HEAD (current branch's committed state)
|
||||
// Using -- to ensure .beads/ is treated as a path, not a branch name
|
||||
cmd := exec.CommandContext(ctx, "git", "checkout", "HEAD", "--", beadsDir) //nolint:gosec // G204: beadsDir from FindBeadsDir(), not user input
|
||||
|
||||
Reference in New Issue
Block a user