wt-status: export also the has_un{staged,committed}_changes() functions
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 7 Oct 2016 16:08:56 +0000 (18:08 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 7 Oct 2016 16:29:31 +0000 (09:29 -0700)
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>
wt-status.c
wt-status.h

index 4f9b513..6ad8fb6 100644 (file)
@@ -2214,7 +2214,7 @@ void wt_status_print(struct wt_status *s)
 /**
  * Returns 1 if there are unstaged changes, 0 otherwise.
  */
-static int has_unstaged_changes(void)
+int has_unstaged_changes(void)
 {
        struct rev_info rev_info;
        int result;
@@ -2230,7 +2230,7 @@ static int has_unstaged_changes(void)
 /**
  * Returns 1 if there are uncommitted changes, 0 otherwise.
  */
-static int has_uncommitted_changes(void)
+int has_uncommitted_changes(void)
 {
        struct rev_info rev_info;
        int result;
index 68b4709..68e367a 100644 (file)
@@ -128,7 +128,9 @@ void status_printf_ln(struct wt_status *s, const char *color, const char *fmt, .
 __attribute__((format (printf, 3, 4)))
 void status_printf(struct wt_status *s, const char *color, const char *fmt, ...);
 
-/* The following function expects that the caller took care of reading the index. */
+/* The following functions expect that the caller took care of reading the index. */
+int has_unstaged_changes(void);
+int has_uncommitted_changes(void);
 int require_clean_work_tree(const char *action, const char *hint, int gently);
 
 #endif /* STATUS_H */