Re: [PATCH v3 4/4] builtin/rebase: support running "git rebase <upstream>"
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Jul 7, 2018, 06:45 UTC
- Message-ID
- <CAP8UFD3_+0EDSzcrx9f70HBpWKvr94re5ZimuXDhfTZzJpfCvQ@mail.gmail.com>
- In-Reply-To
- <20180706120815.17851-5-predatoramigo@gmail.com>
On Fri, Jul 6, 2018 at 2:08 PM, Pratik Karki <predatoramigo@gmail.com> wrote:
Show 20 quoted lines
> + switch (opts->type) {
> + case REBASE_AM:
> + backend = "git-rebase--am";
> + backend_func = "git_rebase__am";
> + break;
> + case REBASE_INTERACTIVE:
> + backend = "git-rebase--interactive";
> + backend_func = "git_rebase__interactive";
> + break;
> + case REBASE_MERGE:
> + backend = "git-rebase--merge";
> + backend_func = "git_rebase__merge";
> + break;
> + case REBASE_PRESERVE_MERGES:
> + backend = "git-rebase--preserve-merges";
> + backend_func = "git_rebase__preserve_merges";
> + break;
> + default:
> + BUG("Unhandled rebase type %d", opts->type);
> + break;Nit: I think the "break;" line could be removed as the BUG() should always exit.
A quick grep shows that there are other places where there is a "break;" line after a BUG() though. Maybe one of the #leftoverbits could be about removing those "break;" lines.
> + }