Add back the exec_path checks that were removed inadvertedly.
[git/mingw.git] / builtin-runstatus.c
blob4b489b1214e1ae693a9b0b5166909800f5ca94ac
1 #include "cache.h"
2 #include "wt-status.h"
4 extern int wt_status_use_color;
6 static const char runstatus_usage[] =
7 "git-runstatus [--color|--nocolor] [--amend] [--verbose] [--untracked]";
9 int cmd_runstatus(int argc, const char **argv, const char *prefix)
11 struct wt_status s;
12 int i;
14 git_config(git_status_config);
15 wt_status_prepare(&s);
17 for (i = 1; i < argc; i++) {
18 if (!strcmp(argv[i], "--color"))
19 wt_status_use_color = 1;
20 else if (!strcmp(argv[i], "--nocolor"))
21 wt_status_use_color = 0;
22 else if (!strcmp(argv[i], "--amend")) {
23 s.amend = 1;
24 s.reference = "HEAD^1";
26 else if (!strcmp(argv[i], "--verbose"))
27 s.verbose = 1;
28 else if (!strcmp(argv[i], "--untracked"))
29 s.untracked = 1;
30 else
31 usage(runstatus_usage);
34 wt_status_print(&s);
35 return s.commitable ? 0 : 1;