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

Re: [PATCH 2/4] Improve cached content header of status output

From
Andy Whitcroft <apw@shadowen.org>
Date
Jan 5, 2007, 10:54 UTC
Message-ID
<459E2E57.6020503@shadowen.org>
In-Reply-To
<11677659921833-git-send-email-j.ruehle@bmiag.de>
Juergen Ruehle wrote:
Show 32 quoted lines
> From: =?iso-8859-1?q?J=FCrgen_R=FChle?= <j-r@online.de>
> 
> This tries to be more to the point while also including a pointer on how to
> unstage changes from the index.
> 
> Since this header is printed in two different code paths and the name of the
> reference commit is needed for the unstage part, provide a new printing
> function.
> 
> Signed-off-by: Jürgen Rühle <j-r@online.de>
> ---
>  wt-status.c |   18 ++++++++++++++----
>  1 files changed, 14 insertions(+), 4 deletions(-)
> 
> diff --git a/wt-status.c b/wt-status.c
> index 34be91b..98ca135 100644
> --- a/wt-status.c
> +++ b/wt-status.c
> @@ -53,6 +53,18 @@ void wt_status_prepare(struct wt_status *s)
>  	s->untracked = 0;
>  }
>  
> +static void wt_status_print_cached_header(const char *reference)
> +{
> +	const char *c = color(WT_STATUS_HEADER);
> +	color_printf_ln(c, "# Cached changes to be committed:");
> +	if (reference) {
> +		color_printf_ln(c, "#   (use \"git reset %s <file>...\" and \"git rm --cached <file>...\" to unstage)", reference);
> +	} else {
> +		color_printf_ln(c, "#   (use \"git rm --cached <file>...\" to unstage)");
> +	}
> +	color_printf_ln(c, "#");

We seem to be using 'Cached' and 'staged' here. I thought we had updated all the docs to call files in the index "Staged for commit". It feels like the header should be more like:

     # Currently staged changes, will be commited:
The rm --cached is somewhat unfortunate either way.
-apw
Previous: Juergen RuehleNext: Junio C Hamano
Message 4 of 15 in “Assorted small changes to runstatus”
  1. Assorted small changes to runstatusJuergen Ruehle, Jan 2, 2007
  2. 1/4 Clarify syntax and role of git-add in status outputJuergen Ruehle, Jan 2, 2007
  3. 2/4 Improve cached content header of status outputJuergen Ruehle, Jan 2, 2007
  4. Andy WhitcroftJan 5, 2007
  5. Junio C HamanoJan 5, 2007
  6. Andy WhitcroftJan 5, 2007
  7. Juergen RuehleJan 5, 2007
  8. Junio C HamanoJan 5, 2007
  9. Andy WhitcroftJan 8, 2007
  10. Juergen RuehleJan 8, 2007
  11. 3/4 Improve "nothing to commit" part of status outputJuergen Ruehle, Jan 2, 2007
  12. 4/4 Support --amend on initial commit in status outputJuergen Ruehle, Jan 2, 2007
  13. Junio C HamanoJan 3, 2007
  14. Juergen RuehleJan 3, 2007
  15. Remove unnecessary git-rm --cached reference from status outputJuergen Ruehle, Jan 7, 2007

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.