Merge remote-tracking branch 'origin/polecat/chrome-mk0vvab8'
This commit is contained in:
@@ -871,7 +871,8 @@ func (g *Git) BranchPushedToRemote(localBranch, remote string) (bool, int, error
|
|||||||
// See: gt-cehl8 (gt done fails in worktrees due to missing origin tracking ref)
|
// See: gt-cehl8 (gt done fails in worktrees due to missing origin tracking ref)
|
||||||
remoteRef := "refs/remotes/" + remoteBranch
|
remoteRef := "refs/remotes/" + remoteBranch
|
||||||
if _, err := g.run("rev-parse", "--verify", remoteRef); err != nil {
|
if _, err := g.run("rev-parse", "--verify", remoteRef); err != nil {
|
||||||
// Remote ref doesn't exist locally - update it from FETCH_HEAD if fetch succeeded
|
// Remote ref doesn't exist locally - update it from FETCH_HEAD if fetch succeeded.
|
||||||
|
// Best-effort: if this fails, the code below falls back to ls-remote.
|
||||||
if fetchErr == nil {
|
if fetchErr == nil {
|
||||||
_, _ = g.run("update-ref", remoteRef, "FETCH_HEAD")
|
_, _ = g.run("update-ref", remoteRef, "FETCH_HEAD")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,13 +62,14 @@ func NewManager(townRoot string, rigsConfig *config.RigsConfig, g *git.Git) *Man
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DiscoverRigs returns all rigs registered in the workspace.
|
// DiscoverRigs returns all rigs registered in the workspace.
|
||||||
|
// Rigs that fail to load are logged to stderr and skipped; partial results are returned.
|
||||||
func (m *Manager) DiscoverRigs() ([]*Rig, error) {
|
func (m *Manager) DiscoverRigs() ([]*Rig, error) {
|
||||||
var rigs []*Rig
|
var rigs []*Rig
|
||||||
|
|
||||||
for name, entry := range m.config.Rigs {
|
for name, entry := range m.config.Rigs {
|
||||||
rig, err := m.loadRig(name, entry)
|
rig, err := m.loadRig(name, entry)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Log error but continue with other rigs
|
fmt.Fprintf(os.Stderr, "Warning: failed to load rig %q: %v\n", name, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
rigs = append(rigs, rig)
|
rigs = append(rigs, rig)
|
||||||
@@ -443,19 +444,19 @@ Use crew for your own workspace. Polecats are for batch work dispatch.
|
|||||||
// Town-level agents (mayor, deacon) are created by gt install in town beads.
|
// Town-level agents (mayor, deacon) are created by gt install in town beads.
|
||||||
if err := m.initAgentBeads(rigPath, opts.Name, opts.BeadsPrefix); err != nil {
|
if err := m.initAgentBeads(rigPath, opts.Name, opts.BeadsPrefix); err != nil {
|
||||||
// Non-fatal: log warning but continue
|
// Non-fatal: log warning but continue
|
||||||
fmt.Printf(" Warning: Could not create agent beads: %v\n", err)
|
fmt.Fprintf(os.Stderr, " Warning: Could not create agent beads: %v\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Seed patrol molecules for this rig
|
// Seed patrol molecules for this rig
|
||||||
if err := m.seedPatrolMolecules(rigPath); err != nil {
|
if err := m.seedPatrolMolecules(rigPath); err != nil {
|
||||||
// Non-fatal: log warning but continue
|
// Non-fatal: log warning but continue
|
||||||
fmt.Printf(" Warning: Could not seed patrol molecules: %v\n", err)
|
fmt.Fprintf(os.Stderr, " Warning: Could not seed patrol molecules: %v\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create plugin directories
|
// Create plugin directories
|
||||||
if err := m.createPluginDirectories(rigPath); err != nil {
|
if err := m.createPluginDirectories(rigPath); err != nil {
|
||||||
// Non-fatal: log warning but continue
|
// Non-fatal: log warning but continue
|
||||||
fmt.Printf(" Warning: Could not create plugin directories: %v\n", err)
|
fmt.Fprintf(os.Stderr, " Warning: Could not create plugin directories: %v\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register in town config
|
// Register in town config
|
||||||
|
|||||||
Reference in New Issue
Block a user