INNER CODE UNIT · Go

setupDone

umputun/ralphex · cmd/ralphex/main.go:782

	setupDone = true // disable safety-net defer, main cleanup takes over
	req.WtCleanup.set(cleanup)
	defer cleanup()

	// open git service inside worktree
	wtGitSvc, err := git.NewService(".", req.Colors.Info(), req.Config.VcsCommand)
	if err != nil {
		return fmt.Errorf("open worktree git service: %w", err)
	}
	wtGitSvc.SetCommitTrailer(req.Config.CommitTrailer)

	// commit plan file on the feature branch (inside worktree), not on the default branch
	if planNeedsCommit {
		if commitErr := wtGitSvc.CommitPlanFile(req.PlanFile, req.GitSvc.Root()); commitErr != nil {
			return fmt.Errorf("commit plan in worktree: %w", commitErr)
		}
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…