wt-status: export also the has_un{staged,committed}_changes() functions

They will be used in the upcoming rebase helper. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Oct 7, 2016 at 18:08 UTC 41a5dd6d8622a67216978131e394148c7fa58b19
2 files changed +5 -3
wt-status.c
+2 -2
@@ -2214,7 +2214,7 @@ void wt_status_print(struct wt_status *s)
2214 /**
2215 * Returns 1 if there are unstaged changes, 0 otherwise.
2216 */
2217 -static int has_unstaged_changes(void)
2217 +int has_unstaged_changes(void)
2218 {
2219 struct rev_info rev_info;
2220 int result;
@@ -2230,7 +2230,7 @@ static int has_unstaged_changes(void)
2230 /**
2231 * Returns 1 if there are uncommitted changes, 0 otherwise.
2232 */
2233 -static int has_uncommitted_changes(void)
2233 +int has_uncommitted_changes(void)
2234 {
2235 struct rev_info rev_info;
2236 int result;
wt-status.h
+3 -1
@@ -128,7 +128,9 @@ void status_printf_ln(struct wt_status *s, const char *color, const char *fmt, .
128 __attribute__((format (printf, 3, 4)))
129 void status_printf(struct wt_status *s, const char *color, const char *fmt, ...);
130
131 -/* The following function expects that the caller took care of reading the index. */
131 +/* The following functions expect that the caller took care of reading the index. */
132 +int has_unstaged_changes(void);
133 +int has_uncommitted_changes(void);
134 int require_clean_work_tree(const char *action, const char *hint, int gently);
135
136 #endif /* STATUS_H */