From: Junio C Hamano Date: Fri, 20 Sep 2024 18:16:29 +0000 (-0700) Subject: Merge branch 'pw/rebase-autostash-fix' X-Git-Tag: v2.47.0-rc0~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b800ec45e53051c41a85900009430704bfdf031;p=thirdparty%2Fgit.git Merge branch 'pw/rebase-autostash-fix' "git rebase --autostash" failed to resurrect the autostashed changes when the command gets aborted after giving back control asking for hlep in conflict resolution. * pw/rebase-autostash-fix: rebase: apply and cleanup autostash when rebase fails to start --- 2b800ec45e53051c41a85900009430704bfdf031 diff --cc builtin/rebase.c index a2c96c080e,ac23c4ddbb..c8361ed929 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@@ -1775,9 -1791,11 +1792,11 @@@ int cmd_rebase(int argc, const char **a /* If a hook exists, give it a chance to interrupt*/ if (!ok_to_skip_pre_rebase && - run_hooks_l("pre-rebase", options.upstream_arg, + run_hooks_l(the_repository, "pre-rebase", options.upstream_arg, - argc ? argv[0] : NULL, NULL)) - die(_("The pre-rebase hook refused to rebase.")); + argc ? argv[0] : NULL, NULL)) { + ret = error(_("The pre-rebase hook refused to rebase.")); + goto cleanup_autostash; + } if (options.flags & REBASE_DIFFSTAT) { struct diff_options opts;