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
flaggy.String(&repoPath, "p", "path", "Path of git repo. (equivalent to --work-tree=<path> --git-dir=<path>/.git/)")
39
-
40
-
filterPath:=""
41
-
flaggy.String(&filterPath, "f", "filter", "Path to filter on in `git log -- <path>`. When in filter mode, the commits, reflog, and stash are filtered based on the given path, and some operations are restricted")
42
-
43
-
gitArg:=""
44
-
flaggy.AddPositionalValue(&gitArg, "git-arg", 1, false, "Panel to focus upon opening lazygit. Accepted values (based on git terminology): status, branch, log, stash. Ignored if --filter arg is passed.")
45
-
46
-
printVersionInfo:=false
47
-
flaggy.Bool(&printVersionInfo, "v", "version", "Print the current version")
48
-
49
-
debug:=false
50
-
flaggy.Bool(&debug, "d", "debug", "Run in debug mode with logging (see --logs flag below). Use the LOG_LEVEL env var to set the log level (debug/info/warn/error)")
51
-
52
-
tailLogs:=false
53
-
flaggy.Bool(&tailLogs, "l", "logs", "Tail lazygit logs (intended to be used when `lazygit --debug` is called in a separate terminal tab)")
54
-
55
-
printDefaultConfig:=false
56
-
flaggy.Bool(&printDefaultConfig, "c", "config", "Print the default config")
57
-
58
-
printConfigDir:=false
59
-
flaggy.Bool(&printConfigDir, "cd", "print-config-dir", "Print the config directory")
60
-
61
-
useConfigDir:=""
62
-
flaggy.String(&useConfigDir, "ucd", "use-config-dir", "override default config directory with provided directory")
63
-
64
-
workTree:=""
65
-
flaggy.String(&workTree, "w", "work-tree", "equivalent of the --work-tree git argument")
66
-
67
-
gitDir:=""
68
-
flaggy.String(&gitDir, "g", "git-dir", "equivalent of the --git-dir git argument")
69
-
70
-
customConfigFile:=""
71
-
flaggy.String(&customConfigFile, "ucf", "use-config-file", "Comma separated list to custom config file(s)")
72
-
73
-
flaggy.Parse()
74
-
75
-
ifos.Getenv("DEBUG") =="TRUE" {
76
-
debug=true
77
-
}
78
-
79
-
return&app.CliArgs{
80
-
RepoPath: repoPath,
81
-
FilterPath: filterPath,
82
-
GitArg: gitArg,
83
-
PrintVersionInfo: printVersionInfo,
84
-
Debug: debug,
85
-
TailLogs: tailLogs,
86
-
PrintDefaultConfig: printDefaultConfig,
87
-
PrintConfigDir: printConfigDir,
88
-
UseConfigDir: useConfigDir,
89
-
WorkTree: workTree,
90
-
GitDir: gitDir,
91
-
CustomConfigFile: customConfigFile,
92
-
}
93
-
}
94
-
95
-
funcgetBuildInfo() *app.BuildInfo {
96
-
buildInfo:=&app.BuildInfo{
16
+
ldFlagsBuildInfo:=&app.BuildInfo{
97
17
Commit: commit,
98
18
Date: date,
99
19
Version: version,
100
20
BuildSource: buildSource,
101
21
}
102
22
103
-
// if the version has already been set by build flags then we'll honour that.
104
-
// chances are it's something like v0.31.0 which is more informative than a
flaggy.String(&repoPath, "p", "path", "Path of git repo. (equivalent to --work-tree=<path> --git-dir=<path>/.git/)")
147
+
148
+
filterPath:=""
149
+
flaggy.String(&filterPath, "f", "filter", "Path to filter on in `git log -- <path>`. When in filter mode, the commits, reflog, and stash are filtered based on the given path, and some operations are restricted")
150
+
151
+
gitArg:=""
152
+
flaggy.AddPositionalValue(&gitArg, "git-arg", 1, false, "Panel to focus upon opening lazygit. Accepted values (based on git terminology): status, branch, log, stash. Ignored if --filter arg is passed.")
153
+
154
+
printVersionInfo:=false
155
+
flaggy.Bool(&printVersionInfo, "v", "version", "Print the current version")
156
+
157
+
debug:=false
158
+
flaggy.Bool(&debug, "d", "debug", "Run in debug mode with logging (see --logs flag below). Use the LOG_LEVEL env var to set the log level (debug/info/warn/error)")
159
+
160
+
tailLogs:=false
161
+
flaggy.Bool(&tailLogs, "l", "logs", "Tail lazygit logs (intended to be used when `lazygit --debug` is called in a separate terminal tab)")
162
+
163
+
printDefaultConfig:=false
164
+
flaggy.Bool(&printDefaultConfig, "c", "config", "Print the default config")
165
+
166
+
printConfigDir:=false
167
+
flaggy.Bool(&printConfigDir, "cd", "print-config-dir", "Print the config directory")
168
+
169
+
useConfigDir:=""
170
+
flaggy.String(&useConfigDir, "ucd", "use-config-dir", "override default config directory with provided directory")
171
+
172
+
workTree:=""
173
+
flaggy.String(&workTree, "w", "work-tree", "equivalent of the --work-tree git argument")
174
+
175
+
gitDir:=""
176
+
flaggy.String(&gitDir, "g", "git-dir", "equivalent of the --git-dir git argument")
177
+
178
+
customConfigFile:=""
179
+
flaggy.String(&customConfigFile, "ucf", "use-config-file", "Comma separated list to custom config file(s)")
0 commit comments