All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] stash: fix USAGE text
@ 2017-01-03 15:53 Marc Strapetz
  2017-01-03 15:53 ` [PATCH 2/2] stash: --[no-]include-untracked option for create Marc Strapetz
  2017-01-09  1:48 ` [PATCH 1/2] stash: fix USAGE text Junio C Hamano
  0 siblings, 2 replies; 3+ messages in thread
From: Marc Strapetz @ 2017-01-03 15:53 UTC (permalink / raw)
  To: git; +Cc: Marc Strapetz

Add missing usage description for stash subcommands
'create' and 'store'.

Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
---
 git-stash.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/git-stash.sh b/git-stash.sh
index 10c284d1a..c6b9db694 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -9,7 +9,9 @@ USAGE="list [<options>]
    or: $dashless branch <branchname> [<stash>]
    or: $dashless [save [--patch] [-k|--[no-]keep-index] [-q|--quiet]
 		       [-u|--include-untracked] [-a|--all] [<message>]]
-   or: $dashless clear"
+   or: $dashless clear
+   or: $dashless create [<message>]
+   or: $dashless store [-m|--message <message>] [-q|--quiet] <commit>"
 
 SUBDIRECTORY_OK=Yes
 OPTIONS_SPEC=
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] stash: --[no-]include-untracked option for create
  2017-01-03 15:53 [PATCH 1/2] stash: fix USAGE text Marc Strapetz
@ 2017-01-03 15:53 ` Marc Strapetz
  2017-01-09  1:48 ` [PATCH 1/2] stash: fix USAGE text Junio C Hamano
  1 sibling, 0 replies; 3+ messages in thread
From: Marc Strapetz @ 2017-01-03 15:53 UTC (permalink / raw)
  To: git; +Cc: Marc Strapetz

Expose internal option to include untracked files
for the stash 'create' subcommand.

Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
---
 Documentation/git-stash.txt |  2 +-
 git-stash.sh                | 14 ++++++++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt
index 2e9cef06e..cc7944e59 100644
--- a/Documentation/git-stash.txt
+++ b/Documentation/git-stash.txt
@@ -16,7 +16,7 @@ SYNOPSIS
 'git stash' [save [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]
 	     [-u|--include-untracked] [-a|--all] [<message>]]
 'git stash' clear
-'git stash' create [<message>]
+'git stash' create [-u|--[no-]include-untracked] [<message>]
 'git stash' store [-m|--message <message>] [-q|--quiet] <commit>
 
 DESCRIPTION
diff --git a/git-stash.sh b/git-stash.sh
index c6b9db694..16f5fe93e 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -10,7 +10,7 @@ USAGE="list [<options>]
    or: $dashless [save [--patch] [-k|--[no-]keep-index] [-q|--quiet]
 		       [-u|--include-untracked] [-a|--all] [<message>]]
    or: $dashless clear
-   or: $dashless create [<message>]
+   or: $dashless create [-u|--[no-]include-untracked] [<message>]
    or: $dashless store [-m|--message <message>] [-q|--quiet] <commit>"
 
 SUBDIRECTORY_OK=Yes
@@ -629,7 +629,17 @@ clear)
 	;;
 create)
 	shift
-	create_stash "$*" && echo "$w_commit"
+	case "$1" in
+	-u|--include-untracked)
+		untracked=untracked
+		shift
+		;;
+	--no-include-untracked)
+		untracked=
+		shift
+		;;
+	esac
+	create_stash "$*" "$untracked" && echo "$w_commit"
 	;;
 store)
 	shift
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] stash: fix USAGE text
  2017-01-03 15:53 [PATCH 1/2] stash: fix USAGE text Marc Strapetz
  2017-01-03 15:53 ` [PATCH 2/2] stash: --[no-]include-untracked option for create Marc Strapetz
@ 2017-01-09  1:48 ` Junio C Hamano
  1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2017-01-09  1:48 UTC (permalink / raw)
  To: Marc Strapetz; +Cc: git

Marc Strapetz <marc.strapetz@syntevo.com> writes:

> Add missing usage description for stash subcommands
> 'create' and 'store'.

I think we didn't add them to usage description when we added them
because these two are not end-user facing commands but for script
writers (who do not use "$ git stash -h <ENTER>" to learn how to
use).

I dunno.

> Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
> ---
>  git-stash.sh | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/git-stash.sh b/git-stash.sh
> index 10c284d1a..c6b9db694 100755
> --- a/git-stash.sh
> +++ b/git-stash.sh
> @@ -9,7 +9,9 @@ USAGE="list [<options>]
>     or: $dashless branch <branchname> [<stash>]
>     or: $dashless [save [--patch] [-k|--[no-]keep-index] [-q|--quiet]
>  		       [-u|--include-untracked] [-a|--all] [<message>]]
> -   or: $dashless clear"
> +   or: $dashless clear
> +   or: $dashless create [<message>]
> +   or: $dashless store [-m|--message <message>] [-q|--quiet] <commit>"
>  
>  SUBDIRECTORY_OK=Yes
>  OPTIONS_SPEC=

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-09  1:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-03 15:53 [PATCH 1/2] stash: fix USAGE text Marc Strapetz
2017-01-03 15:53 ` [PATCH 2/2] stash: --[no-]include-untracked option for create Marc Strapetz
2017-01-09  1:48 ` [PATCH 1/2] stash: fix USAGE text Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.