git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Jul 23, 2008, 14:58 UTC
Message-ID
<20080723145810.GA29177@laptop>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 wt-status.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/wt-status.c b/wt-status.c
index 889e50f..28add31 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -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);
-- 
1.5.5.GIT
Message 1 of 1 in “git-status: print sparse checkout status”
  1. 12/12 git-status: print sparse checkout statusNguyễn Thái Ngọc Duy, Jul 23, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.