Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/wt-status.c b/wt-status.c
index 6c3edcdb45..5d215f4e4f 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -2183,6 +2183,18 @@ static void wt_porcelain_v2_print_tracking(struct wt_status *s)
}
/*
+ * Print the stash count in a porcelain-friendly format
+ */
+static void wt_porcelain_v2_print_stash(struct wt_status *s)
+{
+ int stash_count = count_stash_entries();
+ char eol = s->null_termination ? '\0' : '\n';
+
+ if (stash_count > 0)
+ fprintf(s->fp, "# stash %d%c", stash_count, eol);
+}
+
+/*
* Convert various submodule status values into a
* fixed-length string of characters in the buffer provided.
*/
@@ -2443,6 +2455,9 @@ static void wt_porcelain_v2_print(struct wt_status *s)
if (s->show_branch)
wt_porcelain_v2_print_tracking(s);
+ if (s->show_stash)
+ wt_porcelain_v2_print_stash(s);
+
for (i = 0; i < s->change.nr; i++) {
it = &(s->change.items[i]);
d = it->util;