Re: [PATCH 4/6] builtin/stash: provide a way to export stashes to a ref
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 16, 2022, 17:05 UTC
- Message-ID
- <xmqqk0ctn7yv.fsf@gitster.g>
- In-Reply-To
- <20220310173236.4165310-5-sandals@crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 9 quoted lines
> 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.