diff options
| author | Junio C Hamano <gitster@pobox.com> | 2018-11-18 18:23:56 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-11-18 18:23:56 +0900 |
| commit | 0de3a73eb6b36d5b8df82e62dd5679462f19edef (patch) | |
| tree | 5a27d9b14c9768766c8ae81020a5904e0c6a6b36 /builtin/rebase.c | |
| parent | Merge branch 'js/apply-recount-allow-noop' (diff) | |
| parent | status: rebase and merge can be in progress at the same time (diff) | |
| download | git-0de3a73eb6b36d5b8df82e62dd5679462f19edef.tar.gz git-0de3a73eb6b36d5b8df82e62dd5679462f19edef.zip | |
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/<name> 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
Diffstat (limited to 'builtin/rebase.c')
| -rw-r--r-- | builtin/rebase.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c index 337c5c7f99..59e6f7852f 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -23,6 +23,7 @@ #include "revision.h" #include "commit-reach.h" #include "rerere.h" +#include "branch.h" static char const * const builtin_rebase_usage[] = { N_("git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] " @@ -1021,6 +1022,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) 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; @@ -1039,6 +1041,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) 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; } |
