wt-status: make the require_clean_work_tree() function reusable
The function used by "git pull" to stop the user when the working tree has changes is useful in other places. Let's move it into a more prominent (and into an actually reusable) spot: wt-status.[ch]. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
ea63b393ec
commit
fd84986f46
@@ -128,4 +128,7 @@ 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. */
|
||||
int require_clean_work_tree(const char *action, const char *hint, int gently);
|
||||
|
||||
#endif /* STATUS_H */
|
||||
|
||||
Reference in New Issue
Block a user