You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* giteaofficial/main:
Fix updating user visibility (go-gitea#35036)
Fix git commit committer parsing and add some tests (go-gitea#35007)
Refactor OpenIDConnect to support SSH/FullName sync (go-gitea#34978)
Support base64-encoded agit push options (go-gitea#35037)
Also display "recently pushed branch" alert on PR view (go-gitea#35001)
Make submodule link work with relative path (go-gitea#35034)
Update to go 1.24.5 (go-gitea#35031)
Improve CLI commands (go-gitea#34973)
Tweak eslint config, fix new issues (go-gitea#35019)
# Conflicts:
# templates/repo/commits_list.tmpl
Copy file name to clipboardExpand all lines: cmd/main.go
+64-86Lines changed: 64 additions & 86 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ package cmd
6
6
import (
7
7
"context"
8
8
"fmt"
9
+
"io"
9
10
"os"
10
11
"strings"
11
12
@@ -15,102 +16,63 @@ import (
15
16
"github.com/urfave/cli/v3"
16
17
)
17
18
18
-
// cmdHelp is our own help subcommand with more information
19
-
// Keep in mind that the "./gitea help"(subcommand) is different from "./gitea --help"(flag), the flag doesn't parse the config or output "DEFAULT CONFIGURATION:" information
20
-
funccmdHelp() *cli.Command {
21
-
c:=&cli.Command{
22
-
Name: "help",
23
-
Aliases: []string{"h"},
24
-
Usage: "Shows a list of commands or help for one command",
app.Description=`Gitea program contains "web" and other subcommands. If no subcommand is given, it starts the web server by default. Use "web" subcommand for more web server arguments, use other subcommands for other purposes.`
126
88
app.Version=appVer.Version+appVer.Extra
127
89
app.EnableShellCompletion=true
128
-
129
-
// these sub-commands need to use config file
90
+
app.Flags= []cli.Flag{
91
+
&cli.StringFlag{
92
+
Name: "work-path",
93
+
Aliases: []string{"w"},
94
+
TakesFile: true,
95
+
Usage: "Set Gitea's working path (defaults to the Gitea's binary directory)",
96
+
},
97
+
&cli.StringFlag{
98
+
Name: "config",
99
+
Aliases: []string{"c"},
100
+
TakesFile: true,
101
+
Value: setting.CustomConf,
102
+
Usage: "Set custom config file (defaults to '{WorkPath}/custom/conf/app.ini')",
103
+
},
104
+
&cli.StringFlag{
105
+
Name: "custom-path",
106
+
Aliases: []string{"C"},
107
+
TakesFile: true,
108
+
Usage: "Set custom path (defaults to '{WorkPath}/custom')",
109
+
},
110
+
}
111
+
// these sub-commands need to use a config file
130
112
subCmdWithConfig:= []*cli.Command{
131
-
cmdHelp(), // the "help" sub-command was used to show the more information for "work path" and "custom config"
0 commit comments