summaryrefslogtreecommitdiff
path: root/wt-status.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2006-09-08 08:05:34 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-09-08 23:46:35 (GMT)
commitc91f0d92efb36d7b349f586cafafaf0e6ac3f5b2 (patch)
tree9f328dd9bbc033e3c3d50a43d0a08ebfe6bd0d79 /wt-status.h
parent7c92fe0eaa4fb89e27fa3617b9ae52f20b511573 (diff)
downloadgit-c91f0d92efb36d7b349f586cafafaf0e6ac3f5b2.zip
git-c91f0d92efb36d7b349f586cafafaf0e6ac3f5b2.tar.gz
git-c91f0d92efb36d7b349f586cafafaf0e6ac3f5b2.tar.bz2
git-commit.sh: convert run_status to a C builtin
This creates a new git-runstatus which should do roughly the same thing as the run_status function from git-commit.sh. Except for color support, the main focus has been to keep the output identical, so that it can be verified as correct and then used as a C platform for other improvements to the status printing code. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'wt-status.h')
-rw-r--r--wt-status.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/wt-status.h b/wt-status.h
new file mode 100644
index 0000000..75d3cfe
--- /dev/null
+++ b/wt-status.h
@@ -0,0 +1,24 @@
+#ifndef STATUS_H
+#define STATUS_H
+
+enum color_wt_status {
+ WT_STATUS_HEADER,
+ WT_STATUS_UPDATED,
+ WT_STATUS_CHANGED,
+ WT_STATUS_UNTRACKED,
+};
+
+struct wt_status {
+ int is_initial;
+ char *branch;
+ const char *reference;
+ int commitable;
+ int verbose;
+ int amend;
+};
+
+int git_status_config(const char *var, const char *value);
+void wt_status_prepare(struct wt_status *s);
+void wt_status_print(struct wt_status *s);
+
+#endif /* STATUS_H */