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

Re: [PATCHv2] git-replace.txt: Clarify list mode

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 26, 2011, 16:30 UTC
Message-ID
<7v4o14f844.fsf@alter.siamese.dyndns.org>
In-Reply-To
<0a88518db0b0db8f1a4a4deeebd6dffc2d603e74.1314345131.git.git@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
Show 21 quoted lines
> Clarify that in list mode, "git replace" outputs the shortened ref
> names, not their values.
>
> Also, point to the difficult to find git show-ref $(git replace -l).
>
> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
> ---
>  Documentation/git-replace.txt |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt
> index 17df525..cd00837 100644
> --- a/Documentation/git-replace.txt
> +++ b/Documentation/git-replace.txt
> @@ -61,6 +61,13 @@ OPTIONS
>  	all if no pattern is given).
>  	Typing "git replace" without arguments, also lists all replace
>  	refs.
> ++
> +Note that this lists the names of the replace refs, not their values
> +(not their replacements). You can get the latter like this, e.g.:
Hmm, the update is _not wrong_ per-se, but...

I highly doubt we would want to try to cover confusions that may come from any and all different mis-/pre-conceptions people may have by making the description _longer_.

Which part of the wording in the existing description made you think that the command might list both names and their contents? We should identify that misleading description (if there is) and fix that, instead of tacking clarifying clauses at the end.

Given these statements:
	"git replace" lists all replace refs.
        "ls" lists paths in the directory.

I would say a natural reading of them is that they list "replace refs" and "paths", not "replace refs and their contents" and "paths and their contents".

By the way, one thing I forgot to say was that I do not think the variant of the output you wanted to have is necessarily a bad thing (it is bad to change the existing output to that variant, breaking other people). Perhaps it can become "-v(erbose)" output?

Previous: Michael J GruberNext: Michael J Gruber
Message 5 of 8 in “replace: List replacement along with the object”
  1. replace: List replacement along with the objectMichael J Gruber, Aug 25, 2011
  2. Christian CouderAug 25, 2011
  3. Michael J GruberAug 26, 2011
  4. [PATCHv2] git-replace.txt: Clarify list modeMichael J Gruber, Aug 26, 2011
  5. Junio C HamanoAug 26, 2011
  6. Michael J GruberAug 27, 2011
  7. Christian CouderAug 26, 2011
  8. Junio C HamanoAug 25, 2011

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.