File tree Expand file tree Collapse file tree 7 files changed +37
-0
lines changed Expand file tree Collapse file tree 7 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,12 @@ func (Delete) Name() string {
13
13
return "delete"
14
14
}
15
15
16
+ func (Delete ) Description () string {
17
+ return `
18
+ Remove the configuration for the given '<route>' and delete its repository
19
+ data.`
20
+ }
21
+
16
22
func (Delete ) run (args []string ) error {
17
23
if len (args ) < 1 {
18
24
return errors .New ("usage: git-bundle-server delete <route>" )
Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ func (Init) Name() string {
15
15
return "init"
16
16
}
17
17
18
+ func (Init ) Description () string {
19
+ return `
20
+ Initialize a repository by cloning a bare repo from '<url>', whose bundles
21
+ should be hosted at '<route>'.`
22
+ }
23
+
18
24
func (Init ) run (args []string ) error {
19
25
if len (args ) < 2 {
20
26
// TODO: allow parsing <route> out of <url>
Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ func (Start) Name() string {
14
14
return "start"
15
15
}
16
16
17
+ func (Start ) Description () string {
18
+ return `
19
+ Start computing bundles and serving content for the repository at the
20
+ specified '<route>'.`
21
+ }
22
+
17
23
func (Start ) run (args []string ) error {
18
24
if len (args ) < 1 {
19
25
return errors .New ("usage: git-bundle-server start <route>" )
Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ func (Stop) Name() string {
12
12
return "stop"
13
13
}
14
14
15
+ func (Stop ) Description () string {
16
+ return `
17
+ Stop computing bundles or serving content for the repository at the
18
+ specified '<route>'.`
19
+ }
20
+
15
21
func (Stop ) run (args []string ) error {
16
22
if len (args ) < 1 {
17
23
return errors .New ("usage: git-bundle-server stop <route>" )
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package main
2
2
3
3
type Subcommand interface {
4
4
Name () string
5
+ Description () string
5
6
run (args []string ) error
6
7
}
7
8
Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ func (UpdateAll) Name() string {
14
14
return "update-all"
15
15
}
16
16
17
+ func (UpdateAll ) Description () string {
18
+ return `
19
+ For every configured route, run 'git-bundle-server update <options> <route>'.`
20
+ }
21
+
17
22
func (UpdateAll ) run (args []string ) error {
18
23
exe , err := os .Executable ()
19
24
if err != nil {
Original file line number Diff line number Diff line change @@ -14,6 +14,13 @@ func (Update) Name() string {
14
14
return "update"
15
15
}
16
16
17
+ func (Update ) Description () string {
18
+ return `
19
+ For the repository in the current directory (or the one specified by
20
+ '<route>'), fetch the latest content from the remote, create a new set of
21
+ bundles, and update the bundle list.`
22
+ }
23
+
17
24
func (Update ) run (args []string ) error {
18
25
if len (args ) != 1 {
19
26
// TODO: allow parsing <route> out of <url>
You can’t perform that action at this time.
0 commit comments