Re: [PATCH v4 02/10] rebase -i: generate the script via rebase--helper
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 29, 2017, 06:07 UTC
- Message-ID
- <xmqq60gk8ad5.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <e173445d9a6321f80053967e50375400c0a61764.1493414945.git.johannes.schindelin@gmx.de>
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
Show 27 quoted lines
> diff --git a/sequencer.c b/sequencer.c
> index 130cc868e51..88819a1a2a9 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -2388,3 +2388,52 @@ void append_signoff(struct strbuf *msgbuf, int ignore_footer, unsigned flag)
>
> strbuf_release(&sob);
> }
> +
> +int sequencer_make_script(int keep_empty, FILE *out,
> + int argc, const char **argv)
> +{
> + char *format = NULL;
> + struct pretty_print_context pp = {0};
> + struct strbuf buf = STRBUF_INIT;
> + struct rev_info revs;
> + struct commit *commit;
> +
> + init_revisions(&revs, NULL);
> + revs.verbose_header = 1;
> + revs.max_parents = 1;
> + revs.cherry_pick = 1;
> + revs.limited = 1;
> + revs.reverse = 1;
> + revs.right_only = 1;
> + revs.sort_order = REV_SORT_IN_GRAPH_ORDER;
> + revs.topo_order = 1;cf. <xmqq4lx5i83q.fsf@gitster.mtv.corp.google.com>
This is still futzing below the API implementation detail unnecessarily.