]> git.ipfire.org Git - thirdparty/git.git/blame - builtin-runstatus.c
rename: Break filepairs with different types.
[thirdparty/git.git] / builtin-runstatus.c
CommitLineData
baffc0e7 1#include "builtin.h"
c91f0d92 2#include "cache.h"
85023577 3#include "wt-status.h"
c91f0d92
JK
4
5extern int wt_status_use_color;
6
7static const char runstatus_usage[] =
fd931411 8"git-runstatus [--color|--nocolor] [--amend] [--verbose] [--untracked]";
c91f0d92
JK
9
10int cmd_runstatus(int argc, const char **argv, const char *prefix)
11{
12 struct wt_status s;
13 int i;
14
15 git_config(git_status_config);
16 wt_status_prepare(&s);
17
18 for (i = 1; i < argc; i++) {
19 if (!strcmp(argv[i], "--color"))
20 wt_status_use_color = 1;
21 else if (!strcmp(argv[i], "--nocolor"))
22 wt_status_use_color = 0;
23 else if (!strcmp(argv[i], "--amend")) {
24 s.amend = 1;
25 s.reference = "HEAD^1";
26 }
27 else if (!strcmp(argv[i], "--verbose"))
28 s.verbose = 1;
2074cb0a
JS
29 else if (!strcmp(argv[i], "--untracked"))
30 s.untracked = 1;
c91f0d92
JK
31 else
32 usage(runstatus_usage);
33 }
34
35 wt_status_print(&s);
36 return s.commitable ? 0 : 1;
37}