diff options
author | Denton Liu <liu.denton@gmail.com> | 2020-04-07 10:28:05 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-04-10 09:28:02 -0700 |
commit | 12b6e1367af429628dbaeaa0c7518cacc620d786 (patch) | |
tree | f0c184f39767fe56b556e8269c1736c57c67042d /t/t7603-merge-reduce-heads.sh | |
parent | sequencer: unlink autostash in apply_autostash() (diff) | |
download | tgif-12b6e1367af429628dbaeaa0c7518cacc620d786.tar.xz |
sequencer: implement save_autostash()
Extract common functionality of apply_autostash() into
apply_save_autostash() and use it to implement save_autostash(). This
function will be used in a future commit.
The difference between save_autostash() and apply_autostash() is that
the former does not try to apply the stash. It skips that step and
just stores the created entry in the stash reflog.
This is useful in the case where we abort an operation when an autostash
is present but we don't want to dirty the worktree with the application
of the stash. For example, in a future commit, we will implement
`git merge --autostash`. Since merges can be aborted using
`git reset --hard`, we'd make use of save_autostash() to save the
autostash entry instead of applying it to the worktree thus keeping the
worktree undirtied.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7603-merge-reduce-heads.sh')
0 files changed, 0 insertions, 0 deletions