Skip to content

Commit

Permalink
commands: remove several deprecated commands
Browse files Browse the repository at this point in the history
Removes the following commands: ipfs tar, ipfs urlstore, ipfs repo fsck, ipfs file ls, ipfs dns.
  • Loading branch information
hacdias committed Dec 12, 2023
1 parent 8c4bdd8 commit 5c31db3
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 1,027 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Kubo Changelogs

- [v0.26](docs/changelogs/v0.26.md)
- [v0.25](docs/changelogs/v0.25.md)
- [v0.24](docs/changelogs/v0.24.md)
- [v0.23](docs/changelogs/v0.23.md)
Expand Down
10 changes: 0 additions & 10 deletions core/commands/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func TestROCommands(t *testing.T) {
"/dag/resolve",
"/dag/stat",
"/dag/export",
"/dns",
"/get",
"/ls",
"/name",
Expand Down Expand Up @@ -136,9 +135,6 @@ func TestCommands(t *testing.T) {
"/diag/cmds/set-time",
"/diag/profile",
"/diag/sys",
"/dns",
"/file",
"/file/ls",
"/files",
"/files/chcid",
"/files/cp",
Expand Down Expand Up @@ -229,7 +225,6 @@ func TestCommands(t *testing.T) {
"/refs",
"/refs/local",
"/repo",
"/repo/fsck",
"/repo/gc",
"/repo/migrate",
"/repo/stat",
Expand Down Expand Up @@ -259,12 +254,7 @@ func TestCommands(t *testing.T) {
"/swarm/peering/ls",
"/swarm/peering/rm",
"/swarm/resources",
"/tar",
"/tar/add",
"/tar/cat",
"/update",
"/urlstore",
"/urlstore/add",
"/version",
"/version/deps",
}
Expand Down
78 changes: 0 additions & 78 deletions core/commands/dns.go

This file was deleted.

22 changes: 0 additions & 22 deletions core/commands/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ var RepoCmd = &cmds.Command{
Subcommands: map[string]*cmds.Command{
"stat": repoStatCmd,
"gc": repoGcCmd,
"fsck": repoFsckCmd,
"version": repoVersionCmd,
"verify": repoVerifyCmd,
"migrate": repoMigrateCmd,
Expand Down Expand Up @@ -227,27 +226,6 @@ Version string The repo version.
},
}

var repoFsckCmd = &cmds.Command{
Status: cmds.Deprecated, // https://github.com/ipfs/kubo/issues/6435
Helptext: cmds.HelpText{
Tagline: "Remove repo lockfiles.",
ShortDescription: `
'ipfs repo fsck' is now a no-op.
`,
},
NoRemote: true,
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
return cmds.EmitOnce(res, &MessageOutput{"`ipfs repo fsck` is deprecated and does nothing.\n"})
},
Type: MessageOutput{},
Encoders: cmds.EncoderMap{
cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *MessageOutput) error {
fmt.Fprintf(w, out.Message)
return nil
}),
},
}

type VerifyProgress struct {
Msg string
Progress int
Expand Down
6 changes: 0 additions & 6 deletions core/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
name "github.com/ipfs/kubo/core/commands/name"
ocmd "github.com/ipfs/kubo/core/commands/object"
"github.com/ipfs/kubo/core/commands/pin"
unixfs "github.com/ipfs/kubo/core/commands/unixfs"

cmds "github.com/ipfs/go-ipfs-cmds"
logging "github.com/ipfs/go-log"
Expand Down Expand Up @@ -143,7 +142,6 @@ var rootSubcommands = map[string]*cmds.Command{
"dht": DhtCmd,
"routing": RoutingCmd,
"diag": DiagCmd,
"dns": DNSCmd,
"id": IDCmd,
"key": KeyCmd,
"log": LogCmd,
Expand All @@ -157,10 +155,7 @@ var rootSubcommands = map[string]*cmds.Command{
"refs": RefsCmd,
"resolve": ResolveCmd,
"swarm": SwarmCmd,
"tar": TarCmd,
"file": unixfs.UnixFSCmd,
"update": ExternalBinary("Please see https://github.com/ipfs/ipfs-update/blob/master/README.md#install for installation instructions."),
"urlstore": urlStoreCmd,
"version": VersionCmd,
"shutdown": daemonShutdownCmd,
"cid": CidCmd,
Expand Down Expand Up @@ -188,7 +183,6 @@ var rootROSubcommands = map[string]*cmds.Command{
},
},
"get": GetCmd,
"dns": DNSCmd,
"ls": LsCmd,
"name": {
Subcommands: map[string]*cmds.Command{
Expand Down
118 changes: 0 additions & 118 deletions core/commands/tar.go

This file was deleted.

Loading

0 comments on commit 5c31db3

Please sign in to comment.