Skip to content

Commit

Permalink
git: multi-pack-index
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Aug 16, 2024
1 parent 4a70aa8 commit c5be64d
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 21 deletions.
26 changes: 26 additions & 0 deletions completers/git_completer/cmd/multiPackIndex.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)

var multiPackIndexCmd = &cobra.Command{
Use: "multi-pack-index",
Short: "Write and verify multi-pack-indexes",
Run: func(cmd *cobra.Command, args []string) {},
GroupID: groups[group_low_level_manipulator].ID,
}

func init() {
carapace.Gen(multiPackIndexCmd).Standalone()

multiPackIndexCmd.Flags().Bool("no-progress", false, "turn progress off")
multiPackIndexCmd.Flags().String("object-dir", "", "use given directory for the location of Git objects")
multiPackIndexCmd.Flags().Bool("progress", false, "turn progress on")
rootCmd.AddCommand(multiPackIndexCmd)

carapace.Gen(multiPackIndexCmd).FlagCompletion(carapace.ActionMap{
"object-dir": carapace.ActionDirectories(),
})
}
18 changes: 18 additions & 0 deletions completers/git_completer/cmd/multiPackIndex_expire.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)

var multiPackIndex_expireCmd = &cobra.Command{
Use: "expire",
Short: "Delete the pack-files that are tracked by the MIDX file",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(multiPackIndex_expireCmd).Standalone()

multiPackIndexCmd.AddCommand(multiPackIndex_expireCmd)
}
18 changes: 18 additions & 0 deletions completers/git_completer/cmd/multiPackIndex_repack.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)

var multiPackIndex_repackCmd = &cobra.Command{
Use: "repack",
Short: "Create a new pack-file containing objects in small pack-files",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(multiPackIndex_repackCmd).Standalone()

multiPackIndexCmd.AddCommand(multiPackIndex_repackCmd)
}
18 changes: 18 additions & 0 deletions completers/git_completer/cmd/multiPackIndex_verify.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)

var multiPackIndex_verifyCmd = &cobra.Command{
Use: "verify",
Short: "Verify the contents of the MIDX file",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(multiPackIndex_verifyCmd).Standalone()

multiPackIndexCmd.AddCommand(multiPackIndex_verifyCmd)
}
27 changes: 27 additions & 0 deletions completers/git_completer/cmd/multiPackIndex_write.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)

var multiPackIndex_writeCmd = &cobra.Command{
Use: "write",
Short: "Write a new MIDX file",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(multiPackIndex_writeCmd).Standalone()

multiPackIndex_writeCmd.Flags().Bool("bitmap", false, "write a multi-pack bitmap")
multiPackIndex_writeCmd.Flags().Bool("no-bitmap", false, "do not write a multi-pack bitmap")
multiPackIndex_writeCmd.Flags().String("preferred-pack", "", "specify the tie-breaking pack used when multiple packs contain the same object")
multiPackIndex_writeCmd.Flags().String("refs-snapshot", "", "specify a file which contains a \"refs snapshot\" taken prior to repacking")
multiPackIndex_writeCmd.Flags().Bool("stdin-packs", false, "provide pack index basenames over stdin")
multiPackIndexCmd.AddCommand(multiPackIndex_writeCmd)

carapace.Gen(multiPackIndex_writeCmd).FlagCompletion(carapace.ActionMap{
"refs-snapshot": carapace.ActionFiles(),
})
}
21 changes: 0 additions & 21 deletions completers/git_completer/cmd/multi_pack_index_generated.go

This file was deleted.

0 comments on commit c5be64d

Please sign in to comment.