refactor(repo): drop top-level `entire clone` alias · Entire

refactor(repo): drop top-level entire clone alias

ed8dad7→main·

toothbrush·2w ago·3 files·+0 added/-24 removed

Clone is reachable only via entire repo clone now.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Sessions

20e3f4725476View transcript

[?
Add Entire Repo Clone CommandClaude Code·1 step](/content/gh/entireio/cli/session/e77355db-5c1c-4286-94f0-431cf4b77954#timeline-20e3f4725476/index.html)

Changes

3

55 unmodified lines

56
57
58
59
60
61
62
63
64
65
66
67
68
69
59
60
61

55 unmodified lines

return mirrorCloneProviderGitHub, owner, repo, nil
}

// newCloneAliasCmd is the top-level `entire clone` alias for `entire repo
// clone`. Cobra forbids attaching one command to two parents, so this builds a
// fresh clone command and adds the control-plane flags (--json,
// --insecure-http-auth) the repo group otherwise supplies to its children as
// persistent flags.
func newCloneAliasCmd() *cobra.Command {
    cmd := newRepoCloneCmd()
    addControlPlaneFlags(cmd)
    return cmd
}

func newRepoCloneCmd() *cobra.Command {
    var cluster string
    cmd := &cobra.Command{

Mcmd/entire/cli/repo_clone.go-11

103 unmodified lines

104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
107
108
109

103 unmodified lines

}
}

func TestNewCloneAliasCmd(t *testing.T) {
    t.Parallel()
    cmd := newCloneAliasCmd()
    require.Equal(t, "clone", cmd.Name())
    // Carries the control-plane flags the repo group otherwise supplies to its
    // children as persistent flags, so `entire clone` honors --json /
    // --insecure-http-auth too.
    require.NotNil(t, cmd.PersistentFlags().Lookup("json"))
    require.NotNil(t, cmd.PersistentFlags().Lookup("insecure-http-auth"))
    require.NotNil(t, cmd.Flags().Lookup("cluster"))
}

// TestRepoClone_InvalidClusterFlag locks in that a malformed --cluster is
// rejected up front (before any core is dialled), so the anti-token-leak guard
// validateClusterHost applies to the user-supplied cluster the clone routes to.

Mcmd/entire/cli/repo_clone_test.go-12

97 unmodified lines

98
99
100
101
101
102
103

97 unmodified lines

cmd.AddCommand(newOrgCmd())                                    // hidden during maturation; control-plane org management
    cmd.AddCommand(newProjectCmd())                                // hidden during maturation; control-plane project management
    cmd.AddCommand(newRepoCmd())                                   // hidden during maturation; control-plane repo lifecycle
    cmd.AddCommand(newCloneAliasCmd())                             // top-level alias for 'repo clone'
    cmd.AddCommand(newGrantCmd())                                  // hidden during maturation; control-plane access grants
    cmd.AddCommand(newCleanCmd())
    cmd.AddCommand(newSetupCmd()) // 'configure' — non-agent settings; agent CRUD lives under 'agent'

Mcmd/entire/cli/root.go-1