MCPcopy Create free account
hub / github.com/dotzero/git-profile / unuseProfileResolve

Function unuseProfileResolve

cmd/unuse.go:42–53  ·  view source on GitHub ↗
(args []string, v vcs)

Source from the content-addressed store, hash-verified

40}
41
42func unuseProfileResolve(args []string, v vcs) (string, error) {
43 if len(args) > 0 {
44 return args[0], nil
45 }
46
47 profile, err := v.Get(currentProfileKey)
48 if len(profile) == 0 || err != nil {
49 return "", fmt.Errorf("There is no profile applied to current git repository")
50 }
51
52 return profile, nil
53}
54
55func profileUnapply(cmd *cobra.Command, cfg storage, v vcs, profile string) {
56 entries, ok := cfg.Lookup(profile)

Callers 4

unuseCommandFunction · 0.85

Calls 1

GetMethod · 0.65