Skip to content

Commit

Permalink
Merge pull request #1971 from rsteube/jj-git-clone
Browse files Browse the repository at this point in the history
jj: git clone
  • Loading branch information
rsteube authored Nov 2, 2023
2 parents cfad84f + 7c75656 commit 0688a0f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion completers/jj_completer/cmd/git_clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package cmd

import (
"github.com/rsteube/carapace"
"github.com/rsteube/carapace-bin/pkg/actions/tools/git"
"github.com/spf13/cobra"
)

var git_cloneCmd = &cobra.Command{
Use: "clone",
Use: "clone [OPTIONS] <SOURCE> [DESTINATION]",
Short: "Create a new repo backed by a clone of a Git repo",
Run: func(cmd *cobra.Command, args []string) {},
}
Expand All @@ -17,4 +18,9 @@ func init() {
git_cloneCmd.Flags().Bool("colocate", false, "Whether or not to colocate the Jujutsu repo with the git repo")
git_cloneCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
gitCmd.AddCommand(git_cloneCmd)

carapace.Gen(git_cloneCmd).PositionalCompletion(
git.ActionRepositorySearch(git.SearchOpts{}.Default()),
carapace.ActionDirectories(),
)
}
1 change: 1 addition & 0 deletions completers/jj_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
var rootCmd = &cobra.Command{
Use: "jj",
Short: "Jujutsu (An experimental VCS)",
Long: "https://github.com/martinvonz/jj",
Run: func(cmd *cobra.Command, args []string) {},
}

Expand Down

0 comments on commit 0688a0f

Please sign in to comment.