Subject: Re: [PATCH 4/6] builtin/stash: provide a way to export stashes to a ref

From: Junio C Hamano <[email-masked]>
Date: Wed, 16 Mar 2022 10:05:44 -0700

"brian m. carlson" <[email-masked]> writes:

> diff --git a/builtin/stash.c b/builtin/stash.c
> index 128f0a01ef..582a04dbab 100644
> --- a/builtin/stash.c
> +++ b/builtin/stash.c
> @@ -33,6 +33,7 @@ static const char * const git_stash_usage[] = {
>  	   "          [--] [<pathspec>...]]"),
>  	N_("git stash save [-p|--patch] [-S|--staged] [-k|--[no-]keep-index] [-q|--quiet]\n"
>  	   "          [-u|--include-untracked] [-a|--all] [<message>]"),
> +	N_("git stash export (--print | --to-ref <ref>) [<stashes>]"),

If you mean we can take zero or more stash entries, the way to write
it I think is 

	[<stash>...]

cf. a few lines above about <pathspec>.

> +static const char * const git_stash_export_usage[] = {
> +	N_("git stash export (--print | --to-ref <ref>) [<stashes>]"),
> +	NULL
> +};

Likewise.

I think we agreed that it is a better design to reuse the actual
stash entries as one of the parents of the exported chain element
(while using another parent to string the entries together), so I
won't comment on the actual implementation that recreates multi-way
merge commits with no relation to the stash entries, which we won't
see in the next iteration.

Thanks.