git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Brandon Casey <casey@nrlssc.navy.mil>
To: "SZEDER Gábor" <szeder@ira.uka.de>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH 1/2] Documentation: mention 'git stash pop --index' option explicitly
Date: Mon, 08 Jun 2009 13:24:56 -0500	[thread overview]
Message-ID: <sHD5HzzlpP8aQrH5W2epWAWTSUBcvKbn_nPuGJaIzd_TgO7ILnnVDQ@cipher.nrlssc.navy.mil> (raw)
In-Reply-To: <27f7124b574aa6ac4391b9bd029242ceb5874447.1244475542.git.szeder@ira.uka.de>


Sorry, I didn't read this first patch of yours before I submitted my
own patch to do basically the same thing.  I wasn't trying to trump
you.

-brandon


SZEDER Gábor wrote:
> 'git stash pop' supports the '--index' option since its initial
> implementation (bd56ff54, git-stash: add new 'pop' subcommand,
> 2008-02-22), but its documentation does not mention it explicitly.
> Moreover, both the usage shown by 'git stash -h' and the synopsis
> section in the man page imply that 'git stash pop' does not have any
> options besides the stash to pop.
> 
> First, this patch corrects the usage and the synopsis section by listing
> the '--index' option for the 'pop' subcommand explicitly.
> 
> Second, the patch moves the description of the '--index' option to the
> 'git stash pop' section in the documentation, and refers to it from
> the 'git stash apply' section.  This way it follows the intentions of
> commit d1836637 (Documentation: teach stash/pop workflow instead of
> stash/apply, 2009-05-28), as all 'git stash pop'-related documentation
> will be in one place without references to 'git stash apply'.
> 
> Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
> ---
>  Documentation/git-stash.txt |   15 ++++++++-------
>  git-stash.sh                |    3 ++-
>  2 files changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt
> index 1cc24cc..de90550 100644
> --- a/Documentation/git-stash.txt
> +++ b/Documentation/git-stash.txt
> @@ -9,7 +9,8 @@ SYNOPSIS
>  --------
>  [verse]
>  'git stash' list [<options>]
> -'git stash' (show | drop | pop ) [<stash>]
> +'git stash' (show | drop ) [<stash>]
> +'git stash' pop [--index] [<stash>]
>  'git stash' apply [--index] [<stash>]
>  'git stash' branch <branchname> [<stash>]
>  'git stash' [save [--keep-index] [<message>]]
> @@ -86,16 +87,16 @@ Applying the state can fail with conflicts; in this case, it is not
>  removed from the stash list. You need to resolve the conflicts by hand
>  and call `git stash drop` manually afterwards.
>  +
> -When no `<stash>` is given, `stash@\{0}` is assumed. See also `apply`.
> -
> -apply [--index] [<stash>]::
> -
> -	Like `pop`, but do not remove the state from the stash list.
> -+
>  If the `--index` option is used, then tries to reinstate not only the working
>  tree's changes, but also the index's ones. However, this can fail, when you
>  have conflicts (which are stored in the index, where you therefore can no
>  longer apply the changes as they were originally).
> ++
> +When no `<stash>` is given, `stash@\{0}` is assumed.
> +
> +apply [--index] [<stash>]::
> +
> +	Like `pop`, but do not remove the state from the stash list.
>  
>  branch <branchname> [<stash>]::
>  
> diff --git a/git-stash.sh b/git-stash.sh
> index b9ace99..94f1d3a 100755
> --- a/git-stash.sh
> +++ b/git-stash.sh
> @@ -3,7 +3,8 @@
>  
>  dashless=$(basename "$0" | sed -e 's/-/ /')
>  USAGE="list [<options>]
> -   or: $dashless (show | drop | pop ) [<stash>]
> +   or: $dashless (show | drop ) [<stash>]
> +   or: $dashless pop [--index] [<stash>]
>     or: $dashless apply [--index] [<stash>]
>     or: $dashless branch <branchname> [<stash>]
>     or: $dashless [save [--keep-index] [<message>]]

  parent reply	other threads:[~2009-06-08 18:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-08 16:27 [PATCH 1/2] Documentation: mention 'git stash pop --index' option explicitly SZEDER Gábor
2009-06-08 16:28 ` [PATCH 2/2] bash: add support for 'git stash pop --index' option SZEDER Gábor
2009-06-08 16:42   ` Brandon Casey
2009-06-08 18:24 ` Brandon Casey [this message]
2009-06-08 21:23 ` [PATCH 1/2] Documentation: mention 'git stash pop --index' option explicitly Junio C Hamano
2009-06-08 21:42   ` SZEDER Gábor
2009-06-08 22:57     ` [PATCH v2 " SZEDER Gábor
2009-06-08 22:57       ` [PATCH v2 2/2] bash: add support for 'git stash pop --index' option SZEDER Gábor
2009-06-09  7:18         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sHD5HzzlpP8aQrH5W2epWAWTSUBcvKbn_nPuGJaIzd_TgO7ILnnVDQ@cipher.nrlssc.navy.mil \
    --to=casey@nrlssc.navy.mil \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=szeder@ira.uka.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).