Project:
Git
Code Location:
git://github.com/git/git.gitmaster
/
Outline
- > E color_wt_status
-
>
E
commit_whence
- Cn FROM_COMMIT
- Cn FROM_MERGE
- Cn FROM_CHERRY_PICK
-
>
S
wt_status
- V int is_initial
- V char branch
- V char reference
- V char pathspec
- V int verbose
- V int amend
- V commit_whence whence
- V int nowarn
- V int use_color
- V int relative_paths
- V int submodule_summary
- V int show_ignored_files
- V untracked_status_type show_untracked_files
- V char ignore_submodule_arg
- V char color_palette
- V unsigned colopts
- V int null_termination
- V int show_branch
- V int commitable
- V int workdir_dirty
- V char index_file
- V FILE fp
- V char prefix
- V string_list change
- V string_list untracked
- V string_list ignored
- V uint32_t untracked_in_ms
-
>
S
wt_status_state
- V int merge_in_progress
- V int am_in_progress
- V int am_empty_patch
- V int rebase_in_progress
- V int rebase_interactive_in_progress
- V int cherry_pick_in_progress
- V int bisect_in_progress
- V int revert_in_progress
- V char branch
- V char onto
- V char detached_from
- V unsignedchar detached_sha1
- V unsignedchar revert_head_sha1
wt-status.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#ifndef STATUS_H #define STATUS_H #include <stdio.h> #include "string-list.h" #include "color.h" enum color_wt_status { WT_STATUS_HEADER = 0, WT_STATUS_UPDATED, WT_STATUS_CHANGED, WT_STATUS_UNTRACKED, WT_STATUS_NOBRANCH, WT_STATUS_UNMERGED, WT_STATUS_LOCAL_BRANCH, WT_STATUS_REMOTE_BRANCH, WT_STATUS_ONBRANCH, WT_STATUS_MAXSLOT }; enum untracked_status_type { SHOW_NO_UNTRACKED_FILES, SHOW_NORMAL_UNTRACKED_FILES, SHOW_ALL_UNTRACKED_FILES }; /* from where does this commit originate */ enum commit_whence { FROM_COMMIT, /* normal */ FROM_MERGE, /* commit came from merge */ FROM_CHERRY_PICK /* commit came from cherry-pick */ }; struct wt_status_change_data { int worktree_status; int index_status; int stagemask; char *head_path; unsigned dirty_submodule : 2; unsigned new_submodule_commits : 1; }; struct wt_status { int is_initial; char *branch; const char *reference; const char **pathspec; int verbose; int amend; enum commit_whence whence; int nowarn; int use_color; int relative_paths; int submodule_summary; int show_ignored_files; enum untracked_status_type show_untracked_files; const char *ignore_submodule_arg; char color_palette[WT_STATUS_MAXSLOT][COLOR_MAXLEN]; unsigned colopts; int null_termination; int show_branch; /* These are computed during processing of the individual sections */ int commitable; int workdir_dirty; const char *index_file; FILE *fp; const char *prefix; struct string_list change; struct string_list untracked; struct string_list ignored; uint32_t untracked_in_ms; }; struct wt_status_state { int merge_in_progress; int am_in_progress; int am_empty_patch; int rebase_in_progress; int rebase_interactive_in_progress; int cherry_pick_in_progress; int bisect_in_progress; int revert_in_progress; char *branch; char *onto; char *detached_from; unsigned char detached_sha1[20]; unsigned char revert_head_sha1[20]; }; void wt_status_prepare(struct wt_status *s); void wt_status_print(struct wt_status *s); void wt_status_collect(struct wt_status *s); void wt_status_get_state(struct wt_status_state *state, int get_detached_from); void wt_shortstatus_print(struct wt_status *s); void wt_porcelain_print(struct wt_status *s); void status_printf_ln(struct wt_status *s, const char *color, const char *fmt, ...) ; void status_printf(struct wt_status *s, const char *color, const char *fmt, ...) ; #endif /* STATUS_H */
