git.c: move cmd_struct declaration up
In a later patch we need access to one of these command option constants near the top of this file. Move this block up so we will be able to access the command options. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Mar 24, 2018 at 21:35 UTC
007aa8d8344f97e9e547c128728cd87095f0f0ac
1 file changed
+17
-17
git.c
+17
-17
@@ -4,6 +4,23 @@
4
#include "help.h"
5
#include "run-command.h"
6
7
+#define RUN_SETUP (1<<0)
8
+#define RUN_SETUP_GENTLY (1<<1)
9
+#define USE_PAGER (1<<2)
10
+/*
11
+ * require working tree to be present -- anything uses this needs
12
+ * RUN_SETUP for reading from the configuration file.
13
+ */
14
+#define NEED_WORK_TREE (1<<3)
15
+#define SUPPORT_SUPER_PREFIX (1<<4)
16
+#define DELAY_PAGER_CONFIG (1<<5)
17
+
18
+struct cmd_struct {
19
+ const char *cmd;
20
+ int (*fn)(int, const char **, const char *);
21
+ int option;
22
+};
23
+
24
const char git_usage_string[] =
25
"git [--version] [--help] [-C <path>] [-c name=value]\n"
26
" [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n"
@@ -288,23 +305,6 @@ static int handle_alias(int *argcp, const char ***argv)
305
return ret;
306
}
307
291
-#define RUN_SETUP (1<<0)
292
-#define RUN_SETUP_GENTLY (1<<1)
293
-#define USE_PAGER (1<<2)
294
-/*
295
- * require working tree to be present -- anything uses this needs
296
- * RUN_SETUP for reading from the configuration file.
297
- */
298
-#define NEED_WORK_TREE (1<<3)
299
-#define SUPPORT_SUPER_PREFIX (1<<4)
300
-#define DELAY_PAGER_CONFIG (1<<5)
301
-
302
-struct cmd_struct {
303
- const char *cmd;
304
- int (*fn)(int, const char **, const char *);
305
- int option;
306
-};
307
-
308
static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
309
{
310
int status, help;