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

Re: [PATCH] Documentation/git-add.txt: Explain --patch option in layman terms

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 30, 2009, 20:14 UTC
Message-ID
<7vab1hdppb.fsf@alter.siamese.dyndns.org>
In-Reply-To
<87ocpxb46g.fsf@jondo.cante.net>
Jari Aalto <jari.aalto@cante.net> writes:
Show 17 quoted lines
> Signed-off-by: Jari Aalto <jari.aalto@cante.net>
> ---
>  Documentation/git-add.txt |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
> index e67b7e8..71990c2 100644
> --- a/Documentation/git-add.txt
> +++ b/Documentation/git-add.txt
> @@ -67,14 +67,14 @@ OPTIONS
>  --interactive::
>  	Add modified contents in the working tree interactively to
>  	the index. Optional path arguments may be supplied to limit
> -	operation to a subset of the working tree. See ``Interactive
> -	mode'' for details.
> +	operation to a subset of the working tree. See section
> +	``INTERACTIVE MODE'' for details.
Sorry, the change in this hunk does not make *any* sense to me.

It is not justified with your commit log message, I do not see why you have to shout in all CAPS, and there is no such section in the documentation. But the "Interactive mode" section exists and is referred to by the original.

Show 8 quoted lines
>  -p::
>  --patch::
> -	Similar to Interactive mode but the initial command loop is
> -	bypassed and the 'patch' subcommand is invoked using each of
> -	the specified filepatterns before exiting.
> +	Run interactive patch command for each file on command line.
> +	See section INTERACTIVE MODE and patch subcommand for more
> +	information.

I personally think fixing misworded phrase "initial command loop" would be sufficient. It should read "initial command menu". Perhaps like this.

	Run ``add --interactive``, but bypass the initial command menu and
	directly jump to `patch` subcommand.  See ``Interactive mode'' for
	details.

If you assume that the reader is not familiar with "add -i", then the above is not descriptive enough, but "Run interactive patch command" is not an improvement either. We would need a description of "what it is used for" before "how it would look to you" (i.e.. my rewrite shown above).

"What it is used for" would perhaps read like this.
	Review the difference between the index and the work tree, and add
	modified contents to the index interactively by choosing which
	patch hunks to use.
Previous: Jari AaltoNext: Jeff King
Message 2 of 21 in “Documentation/git-add.txt: Explain --patch option in layman terms”
  1. Documentation/git-add.txt: Explain --patch option in layman termsJari Aalto, Aug 30, 2009
  2. Junio C HamanoAug 30, 2009
  3. Jeff KingAug 30, 2009
  4. Jari AaltoAug 30, 2009
  5. Junio C HamanoAug 30, 2009
  6. Jari AaltoAug 30, 2009
  7. Junio C HamanoAug 30, 2009
  8. Jari AaltoAug 31, 2009
  9. Junio C HamanoAug 31, 2009
  10. Improve --patch option documentation in git-addJari Aalto, Sep 13, 2009
  11. Mikael MagnussonSep 13, 2009
  12. Jari AaltoSep 13, 2009
  13. Sean EstabrooksSep 14, 2009
  14. Jari AaltoSep 15, 2009
  15. Nanako ShiraishiSep 15, 2009
  16. Jari AaltoSep 15, 2009
  17. Nanako ShiraishiSep 15, 2009
  18. Junio C HamanoAug 30, 2009
  19. Jari AaltoAug 31, 2009
  20. Junio C HamanoAug 31, 2009
  21. Jari AaltoAug 30, 2009

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.