# Re: \[GSoC\] \[PATCH v6 3/3\] builtin/rebase: support running "git rebase \<upstream\>"

- From: Junio C Hamano \<hidden\>
- Date: 2018-08-16 21:43:09 
- List: git
- Page: https://ratatoskr.run/git/2018/08/7780490
- Thread: https://ratatoskr.run/git/2018/08/7780490/t.md

```text
Now, there is a parallel "rebase-i-in-c" effort going on, and of
course, setting various shell various and formulating a command line
that essentially does 

	. git-rebase--$backend

of course stops working.

> +static int run_specific_rebase(struct rebase_options *opts)
> +{
> +	const char *argv[] = { NULL, NULL };
> + ...
> +	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;
> + ...
> +	strbuf_addf(&script_snippet,
> +		    ". git-sh-setup && . git-rebase--common &&"
> +		    " . %s && %s", backend, backend_func);
> +	argv[0] = script_snippet.buf;
> +
> +	status = run_command_v_opt(argv, RUN_USING_SHELL);

```
