summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-03-24 21:35:18 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-03-25 09:30:36 -0700
commit007aa8d8344f97e9e547c128728cd87095f0f0ac (patch)
treee2068a587557c6851f7a73b652684c2ea3670952 /git.c
parentt9902: disable test on the list of merge-strategies under GETTEXT_POISON (diff)
downloadtgif-007aa8d8344f97e9e547c128728cd87095f0f0ac.tar.xz
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>
Diffstat (limited to 'git.c')
-rw-r--r--git.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/git.c b/git.c
index c870b9719c..ab9858e8eb 100644
--- a/git.c
+++ b/git.c
@@ -4,6 +4,23 @@
#include "help.h"
#include "run-command.h"
+#define RUN_SETUP (1<<0)
+#define RUN_SETUP_GENTLY (1<<1)
+#define USE_PAGER (1<<2)
+/*
+ * require working tree to be present -- anything uses this needs
+ * RUN_SETUP for reading from the configuration file.
+ */
+#define NEED_WORK_TREE (1<<3)
+#define SUPPORT_SUPER_PREFIX (1<<4)
+#define DELAY_PAGER_CONFIG (1<<5)
+
+struct cmd_struct {
+ const char *cmd;
+ int (*fn)(int, const char **, const char *);
+ int option;
+};
+
const char git_usage_string[] =
"git [--version] [--help] [-C <path>] [-c name=value]\n"
" [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n"
@@ -288,23 +305,6 @@ static int handle_alias(int *argcp, const char ***argv)
return ret;
}
-#define RUN_SETUP (1<<0)
-#define RUN_SETUP_GENTLY (1<<1)
-#define USE_PAGER (1<<2)
-/*
- * require working tree to be present -- anything uses this needs
- * RUN_SETUP for reading from the configuration file.
- */
-#define NEED_WORK_TREE (1<<3)
-#define SUPPORT_SUPER_PREFIX (1<<4)
-#define DELAY_PAGER_CONFIG (1<<5)
-
-struct cmd_struct {
- const char *cmd;
- int (*fn)(int, const char **, const char *);
- int option;
-};
-
static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
{
int status, help;