-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
66 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var commitGraph_verifyCmd = &cobra.Command{ | ||
Use: "verify", | ||
Short: "Read the commit-graph file and verify its contents against the object database", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(commitGraph_verifyCmd).Standalone() | ||
|
||
commitGraph_verifyCmd.Flags().Bool("no-progress", false, "Turn progress off explicitly") | ||
commitGraph_verifyCmd.Flags().String("object-dir", "", "Use given directory for the location of packfiles and commit-graph file") | ||
commitGraph_verifyCmd.Flags().Bool("progress", false, "Turn progress on explicitly") | ||
commitGraph_verifyCmd.Flags().Bool("shallow", false, "Only check the tip commit-graph file in a chain of split commit-graphs") | ||
commitGraphCmd.AddCommand(commitGraph_verifyCmd) | ||
|
||
carapace.Gen(commitGraph_verifyCmd).FlagCompletion(carapace.ActionMap{ | ||
"object-dir": carapace.ActionDirectories(), | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var commitGraph_writeCmd = &cobra.Command{ | ||
Use: "write", | ||
Short: "Write a commit-graph file based on the commits found in packfiles", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(commitGraph_writeCmd).Standalone() | ||
|
||
commitGraph_writeCmd.Flags().Bool("append", false, "Include all commits that are present in the existing commit-graph file") | ||
commitGraph_writeCmd.Flags().Bool("changed-paths", false, "Compute and write information about the paths changed between a commit and its first parent") | ||
commitGraph_writeCmd.Flags().String("max-new-filters", "", "Generate at most n new Bloom filters") | ||
commitGraph_writeCmd.Flags().Bool("no-max-new-filters", false, "Do not limit Bloom filters") // TODO verify | ||
commitGraph_writeCmd.Flags().Bool("no-progress", false, "Turn progress off explicitly") | ||
commitGraph_writeCmd.Flags().String("object-dir", "", "Use given directory for the location of packfiles and commit-graph file") | ||
commitGraph_writeCmd.Flags().Bool("progress", false, "Turn progress on explicitly") | ||
commitGraph_writeCmd.Flags().Bool("reachable", false, "Generate the new commit graph by walking commits starting at all refs.") | ||
commitGraph_writeCmd.Flags().String("split", "", "Write the commit-graph as a chain of multiple commit-graph files stored in <dir>/info/commit-graphs") | ||
commitGraph_writeCmd.Flags().Bool("stdin-commits", false, "Generate the new commit graph by walking commits starting at the commits specified in stdin as a list of OIDs in hex, one OID per line") | ||
commitGraph_writeCmd.Flags().Bool("stdin-packs", false, "Generate the new commit graph by walking objects only in the specified pack-indexe") | ||
commitGraphCmd.AddCommand(commitGraph_writeCmd) | ||
|
||
commitGraph_writeCmd.MarkFlagsMutuallyExclusive("reachable", "stdin-packs", "stdin-commits") | ||
|
||
carapace.Gen(commitGraph_writeCmd).FlagCompletion(carapace.ActionMap{ | ||
"object-dir": carapace.ActionDirectories(), | ||
"split": carapace.ActionValues("no-merge", "replace"), | ||
}) | ||
} |