]> git.ipfire.org Git - thirdparty/git.git/blobdiff - wt-status.h
strmap: enable allocations to come from a mem_pool
[thirdparty/git.git] / wt-status.h
index 73ab5d4da1c0b4766cb63501b9db06c0a7fea934..35b44c388edf0cd75cca00e1458b9995c8001538 100644 (file)
@@ -79,6 +79,7 @@ enum wt_status_format {
 
 #define HEAD_DETACHED_AT _("HEAD detached at ")
 #define HEAD_DETACHED_FROM _("HEAD detached from ")
+#define SPARSE_CHECKOUT_DISABLED -1
 
 struct wt_status_state {
        int merge_in_progress;
@@ -90,6 +91,7 @@ struct wt_status_state {
        int bisect_in_progress;
        int revert_in_progress;
        int detached_at;
+       int sparse_checkout_percentage; /* SPARSE_CHECKOUT_DISABLED if not sparse */
        char *branch;
        char *onto;
        char *detached_from;
@@ -149,7 +151,14 @@ void wt_status_add_cut_line(FILE *fp);
 void wt_status_prepare(struct repository *r, struct wt_status *s);
 void wt_status_print(struct wt_status *s);
 void wt_status_collect(struct wt_status *s);
+/*
+ * Frees the buffers allocated by wt_status_collect.
+ */
 void wt_status_collect_free_buffers(struct wt_status *s);
+/*
+ * Frees the buffers of the wt_status_state.
+ */
+void wt_status_state_free_buffers(struct wt_status_state *s);
 void wt_status_get_state(struct repository *repo,
                         struct wt_status_state *state,
                         int get_detached_from);