Re: [PATCH v5 3/4] builtin/stash: provide a way to export stashes to a ref
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 12, 2025, 15:53 UTC
- Message-ID
- <xmqqplgdvn8v.fsf@gitster.g>
- In-Reply-To
- <67ba7cf4-e6b9-4c05-9960-e95fdcd4ed97@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 11 quoted lines
> I think the commit message would be more convincing if it concentrated
> on the need to import / export chains of stashes and the convenience of
> having a dedicated command to import a stash as one can export a single
> stash with
>
> git push <remote> refs/stash@{<n>}:refs/exported-stash
>
> and then import it with
>
> git pull <remote> refs/exported-stash
> git update-ref refs/stash FETCH_HEADOooh, then as long as the other side has enabled reflog, you could even do
for n in $(seq 0 N)
do
git push <remote> +refs/stash@{$n}:refs/stash
doneand we can call it done? ;-)
> Having said that I do agree that adding these new commands is a good > idea.
Yeah, I do not think there is no reason to oppose having an export/import pair.