fix: Initialize git before beads to enable repo fingerprint (#180)

Fix: Initialize git before beads to enable repo fingerprint computation

Fixes #25
This commit is contained in:
Johann Taberlet
2026-01-06 04:14:23 +01:00
committed by GitHub
parent 688624ca6b
commit 97564dfc13

View File

@@ -188,6 +188,15 @@ func runInstall(cmd *cobra.Command, args []string) error {
fmt.Printf(" ✓ Created .claude/settings.json\n")
}
// Initialize git BEFORE beads so that bd can compute repository fingerprint.
// The fingerprint is required for the daemon to start properly.
if installGit || installGitHub != "" {
fmt.Println()
if err := InitGitForHarness(absPath, installGitHub, !installPublic); err != nil {
return fmt.Errorf("git initialization failed: %w", err)
}
}
// Initialize town-level beads database (optional)
// Town beads (hq- prefix) stores mayor mail, cross-rig coordination, and handoffs.
// Rig beads are separate and have their own prefixes.
@@ -234,14 +243,6 @@ func runInstall(cmd *cobra.Command, args []string) error {
fmt.Printf(" ✓ Created .claude/commands/ (slash commands for all agents)\n")
}
// Initialize git if requested (--git or --github implies --git)
if installGit || installGitHub != "" {
fmt.Println()
if err := InitGitForHarness(absPath, installGitHub, !installPublic); err != nil {
return fmt.Errorf("git initialization failed: %w", err)
}
}
fmt.Printf("\n%s HQ created successfully!\n", style.Bold.Render("✓"))
fmt.Println()
fmt.Println("Next steps:")