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

Re: [PATCH] Improve --patch option documentation in git-add

From
MMMikael Magnusson <mikachu@gmail.com>
Date
Sep 13, 2009, 13:48 UTC
Message-ID
<237967ef0909130648l36b592aft9c50ccff5d03d1b1@mail.gmail.com>
In-Reply-To
<87ab0zny27.fsf_-_@jondo.cante.net>
2009/9/13 Jari Aalto <jari.aalto@cante.net>:
Show 40 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Jari Aalto <jari.aalto@cante.net> writes:
>>
>>>     --patch:
>>>     -p::
>>>         In a modified work tree, choose interactively which patch hunks to
>>>         add. This gives a change to review the difference between the
>>>         index and the work before adding modified contents to the index.
>>
>> Sounds sensible.  You may want to be even more direct and succinct, e.g.
>>
>>     Interactively choose hunks of patch between the index and the work
>>     tree and add them to the index.
>
> Thanks, see below,
> Jari
>
> From 63aa94e7782d6340ead0446ea80ed6223d7ac5c1 Mon Sep 17 00:00:00 2001
> From: Jari Aalto <jari.aalto@cante.net>
> Date: Sun, 13 Sep 2009 09:43:10 +0300
> Subject: [PATCH] Improve --patch option documentation in git-add
>
> Signed-off-by: Jari Aalto <jari.aalto@cante.net>
> ---
>  Documentation/git-add.txt |   11 ++++++++---
>  1 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
> index e67b7e8..b94fbec 100644
> --- a/Documentation/git-add.txt
> +++ b/Documentation/git-add.txt
> @@ -72,9 +72,14 @@ OPTIONS
>
>  -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.
> +       Interactively choose hunks of patch between the index and the
diff probably makes more sense than patch here
> +       work tree and add them to the index. This gives a change to
a chance
> +       review the difference before adding modified contents to the
differences? Not sure which I prefer on this one.
> +       index.
> +
> +       This effectively runs ``add --interactive``, but bypass the
bypasses
> +       initial command menu and directly jump to `patch` subcommand.
jumps
Show 6 quoted lines
> +       See ``Interactive mode'' for details.
>
>  -e, \--edit::
>        Open the diff vs. the index in an editor and let the user
> --
> 1.6.3.3
-- 
Mikael Magnusson
Previous: Jari AaltoNext: Jari Aalto
Message 11 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.