Skip to content

Commit cfcfdda

Browse files
authored
Merge pull request #3224 from carapace-sh/git-upload-pack
git: upload-pack
2 parents 785826e + 164cc06 commit cfcfdda

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var uploadPackCmd = &cobra.Command{
9+
Use: "upload-pack",
10+
Short: "Send objects packed back to git-fetch-pack",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
GroupID: groups[group_low_level_synching].ID,
13+
}
14+
15+
func init() {
16+
carapace.Gen(uploadPackCmd).Standalone()
17+
18+
uploadPackCmd.Flags().Bool("http-backend-info-refs", false, "Used by git-http-backend(1) to serve up $GIT_URL/info/refs?service=git-upload-pack requests")
19+
uploadPackCmd.Flags().Bool("stateless-rpc", false, "Perform only a single read-write cycle with stdin and stdout")
20+
uploadPackCmd.Flags().Bool("strict", false, "Do not try <directory>/.git/ if <directory> is not a Git directory")
21+
uploadPackCmd.Flags().String("timeout", "", "Interrupt transfer after <n> seconds of inactivity")
22+
rootCmd.AddCommand(uploadPackCmd)
23+
24+
carapace.Gen(uploadPackCmd).PositionalCompletion(
25+
carapace.ActionDirectories(),
26+
)
27+
}

0 commit comments

Comments
 (0)