Skip to content

pr-git-1528/nadav96/stash_preserve-v1

From: Nadav Goldstein <nadav.goldstein@blazepod.co>

In this patch, we introduce a new subcommand preserve to
git stash. The purpose of this subcommand is to save the
current changes into the stash and then immediately re-apply
those changes to the working directory.

Implementation-wise, this is achieved by adding a new branch
to the conditional in the cmd_stash function, where we check
if argv[0] is "preserve". If it is, we push_stash with the
new argument that we added to it preserve=1.
In all other cases we call push_stack/do_push_stack preserve=0

Signed-off-by: Nadav Goldstein <nadav.goldstein96@gmail.com>

Submitted-As: https://lore.kernel.org/git/pull.1528.git.git.1686913210137.gitgitgadget@gmail.com
Assets 2