summaryrefslogtreecommitdiff
path: root/builtin/rebase.c
diff options
context:
space:
mode:
authorLibravatar Denton Liu <liu.denton@gmail.com>2020-04-28 05:31:31 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-04-28 12:35:38 -0700
commit9b2df3e8d093145f1628af82b94f6dcfc85b9646 (patch)
treec804fc971189f0da9df34f104360002720c9d64d /builtin/rebase.c
parentpull: pass --autostash to merge (diff)
downloadtgif-9b2df3e8d093145f1628af82b94f6dcfc85b9646.tar.xz
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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c
index bc4fc69906..71aec532b1 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;