diff options
author | Denton Liu <liu.denton@gmail.com> | 2020-04-28 12:31:31 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-04-28 22:35:38 +0300 |
commit | 9b2df3e8d093145f1628af82b94f6dcfc85b9646 (patch) | |
tree | c804fc971189f0da9df34f104360002720c9d64d /builtin/rebase.c | |
parent | d9f15d37f1a545305988f6b2bb40de1fbf0049cf (diff) |
rebase: save autostash entry into stash reflog on --quit
In a03b55530a (merge: teach --autostash option, 2020-04-07), the
--autostash option was introduced for `git merge`. Notably, when
`git merge --quit` is run with an autostash entry present, it is saved
into the stash reflog. This is contrasted with the current behaviour of
`git rebase --quit` where the autostash entry is simply just dropped out
of existence.
Adopt the behaviour of `git merge --quit` in `git rebase --quit` and
save the autostash entry into the stash reflog instead of just deleting
it.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/rebase.c')
-rw-r--r-- | builtin/rebase.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c index bc4fc699064..71aec532b1d 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -1556,6 +1556,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) goto cleanup; } case ACTION_QUIT: { + save_autostash(state_dir_path("autostash", &options)); if (options.type == REBASE_MERGE) { struct replay_opts replay = REPLAY_OPTS_INIT; |