Skip to content

Commit 41a5dd6

Browse files
dschogitster
authored andcommitted
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>
1 parent fd84986 commit 41a5dd6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

wt-status.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2214,7 +2214,7 @@ void wt_status_print(struct wt_status *s)
22142214
/**
22152215
* Returns 1 if there are unstaged changes, 0 otherwise.
22162216
*/
2217-
static int has_unstaged_changes(void)
2217+
int has_unstaged_changes(void)
22182218
{
22192219
struct rev_info rev_info;
22202220
int result;
@@ -2230,7 +2230,7 @@ static int has_unstaged_changes(void)
22302230
/**
22312231
* Returns 1 if there are uncommitted changes, 0 otherwise.
22322232
*/
2233-
static int has_uncommitted_changes(void)
2233+
int has_uncommitted_changes(void)
22342234
{
22352235
struct rev_info rev_info;
22362236
int result;

wt-status.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ void status_printf_ln(struct wt_status *s, const char *color, const char *fmt, .
128128
__attribute__((format (printf, 3, 4)))
129129
void status_printf(struct wt_status *s, const char *color, const char *fmt, ...);
130130

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);
132134
int require_clean_work_tree(const char *action, const char *hint, int gently);
133135

134136
#endif /* STATUS_H */

0 commit comments

Comments
 (0)