wt-status.h 927 Bytes
Newer Older
1 2 3
#ifndef STATUS_H
#define STATUS_H

4 5
#include <stdio.h>

6 7 8 9 10
enum color_wt_status {
	WT_STATUS_HEADER,
	WT_STATUS_UPDATED,
	WT_STATUS_CHANGED,
	WT_STATUS_UNTRACKED,
11
	WT_STATUS_NOBRANCH,
12 13
};

14
enum untracked_status_type {
15 16
	SHOW_NO_UNTRACKED_FILES,
	SHOW_NORMAL_UNTRACKED_FILES,
17 18 19 20
	SHOW_ALL_UNTRACKED_FILES
};
extern enum untracked_status_type show_untracked_files;

21 22 23 24 25 26
struct wt_status {
	int is_initial;
	char *branch;
	const char *reference;
	int verbose;
	int amend;
27
	int untracked;
28
	int nowarn;
29 30 31 32
	/* These are computed during processing of the individual sections */
	int commitable;
	int workdir_dirty;
	int workdir_untracked;
33
	const char *index_file;
34
	FILE *fp;
35
	const char *prefix;
36 37
};

38
int git_status_config(const char *var, const char *value, void *cb);
39 40
extern int wt_status_use_color;
extern int wt_status_relative_paths;
41 42 43 44
void wt_status_prepare(struct wt_status *s);
void wt_status_print(struct wt_status *s);

#endif /* STATUS_H */