Re: [PATCH v3 13/25] sequencer: prepare for rebase -i's commit functionality

2016-10-14 Thread Junio C Hamano
Johannes Schindelin writes: >> I think my puzzlement comes from here. What makes it OK for "am" to >> expect the contents of author-script file to be quoted but it is not >> OK to expect the same here? What makes it not quoted for _this_ >> reader, in other words? >

Re: [PATCH v3 13/25] sequencer: prepare for rebase -i's commit functionality

2016-10-13 Thread Johannes Schindelin
Hi Junio, On Wed, 12 Oct 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > >> Hmph, didn't we recently add parse_key_value_squoted() to build > >> read_author_script() in builtin/am.c on top of it, so that this > >> piece of code can also take advantage

Re: [PATCH v3 13/25] sequencer: prepare for rebase -i's commit functionality

2016-10-12 Thread Junio C Hamano
Johannes Schindelin writes: >> Hmph, didn't we recently add parse_key_value_squoted() to build >> read_author_script() in builtin/am.c on top of it, so that this >> piece of code can also take advantage of and share the parser? > > I already pointed out that the

Re: [PATCH v3 13/25] sequencer: prepare for rebase -i's commit functionality

2016-10-12 Thread Johannes Schindelin
Hi Junio, On Tue, 11 Oct 2016, Junio C Hamano wrote: > > @@ -370,19 +383,79 @@ static int is_index_unchanged(void) > > } > > > > /* > > + * Read the author-script file into an environment block, ready for use in > > + * run_command(), that can be free()d afterwards. > > + */ > > +static char

Re: [PATCH v3 13/25] sequencer: prepare for rebase -i's commit functionality

2016-10-11 Thread Junio C Hamano
> @@ -370,19 +383,79 @@ static int is_index_unchanged(void) > } > > /* > + * Read the author-script file into an environment block, ready for use in > + * run_command(), that can be free()d afterwards. > + */ > +static char **read_author_script(void) > +{ > + struct strbuf script =

[PATCH v3 13/25] sequencer: prepare for rebase -i's commit functionality

2016-10-10 Thread Johannes Schindelin
In interactive rebases, we commit a little bit differently than the sequencer did so far: we heed the "author-script", the "message" and the "amend" files in the .git/rebase-merge/ subdirectory. Likewise, we may want to edit the commit message *even* when providing a file containing the suggested