From: Junio C Hamano Date: Sun, 18 Nov 2018 09:23:56 +0000 (+0900) Subject: Merge branch 'js/rebase-r-and-merge-head' X-Git-Tag: v2.20.0-rc0~14 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/0de3a73eb6b36d5b8df82e62dd5679462f19edef Merge branch 'js/rebase-r-and-merge-head' Bugfix for the recently graduated "git rebase --rebase-merges". * js/rebase-r-and-merge-head: status: rebase and merge can be in progress at the same time built-in rebase --skip/--abort: clean up stale .git/ files rebase -i: include MERGE_HEAD into files to clean up rebase -r: do not write MERGE_HEAD unless needed rebase -r: demonstrate bug with conflicting merges --- 0de3a73eb6b36d5b8df82e62dd5679462f19edef diff --cc builtin/rebase.c index 337c5c7f99,017dce1b50..59e6f7852f --- a/builtin/rebase.c +++ b/builtin/rebase.c @@@ -1018,9 -1001,9 +1019,10 @@@ int cmd_rebase(int argc, const char **a rerere_clear(&merge_rr); string_list_clear(&merge_rr, 1); - if (reset_head(NULL, "reset", NULL, 0, NULL, NULL) < 0) + if (reset_head(NULL, "reset", NULL, RESET_HEAD_HARD, + NULL, NULL) < 0) die(_("could not discard worktree changes")); + remove_branch_state(); if (read_basic_state(&options)) exit(1); goto run_rebase; @@@ -1035,10 -1018,10 +1037,11 @@@ if (read_basic_state(&options)) exit(1); if (reset_head(&options.orig_head, "reset", - options.head_name, 0, NULL, NULL) < 0) + options.head_name, RESET_HEAD_HARD, + NULL, NULL) < 0) die(_("could not move back to %s"), oid_to_hex(&options.orig_head)); + remove_branch_state(); ret = finish_rebase(&options); goto cleanup; }