Skip to contentSkip to conversation

git-status: print sparse checkout status

PATCH In review Nguyễn Thái Ngọc Duy 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 12/12 git-status: print sparse checkout status

---
 wt-status.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
wt-status.c +9 -3
index 889e50f..28add31 100644
@@ -361,12 +361,18 @@ void wt_status_print(struct wt_status *s)
 		color_fprintf_ln(s->fp, color(WT_STATUS_HEADER), "#");
 		color_fprintf_ln(s->fp, color(WT_STATUS_HEADER), "# Initial commit");
 		color_fprintf_ln(s->fp, color(WT_STATUS_HEADER), "#");
-		wt_status_print_initial(s);
 	}
-	else {
-		wt_status_print_updated(s);
+
+	if (get_sparse_prefix()) {
+		color_fprintf(s->fp, color(WT_STATUS_HEADER), "# Sparse checkout: ");
+		color_fprintf_ln(s->fp, color(WT_STATUS_HEADER), get_sparse_prefix_str());
 	}
 
+	if (s->is_initial)
+		wt_status_print_initial(s);
+	else
+		wt_status_print_updated(s);
+
 	wt_status_print_changed(s);
 	if (wt_status_submodule_summary)
 		wt_status_print_submodule_summary(s);
Signature · 1 line
1.5.5.GIT