Re: [PATCH 21/22] sequencer: left-trim the lines read from the script
Hi Junio, On Thu, 1 Sep 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > >> > Interactive rebase's scripts may be indented; We need to handle this > >> > case, too, now that we prepare the sequencer to process interactive > >> > rebases. > >> > >> s/; We need/; we need/ > > > > Hrmpf. From http://grammar.ccc.commnet.edu/grammar/marks/colon.htm: > > > > There is some disagreement among writing reference manuals about > > when you should capitalize an independent clause following a > > colon. Most of the manuals advise that when you have more than one > > sentence in your explanation or when your sentence(s) is a formal > > quotation, a capital is a good idea. The NYPL Writer's Guide urges > > consistency within a document; the Chicago Manual of Style says > > you may begin an independent clause with a lowercase letter unless it's > > one of those two things (a quotation or more than one sentence). > > The APA Publication Manual is the most extreme: it advises us to > > always capitalize an independent clause following a colon. The advice > > given above is consistent with the Gregg Reference Manual. > > > > Based on that, I think that a capital is the correct case here. > > Does that manual have anything to say about semicolons, which is a > different thing? You're correct, I overlooked that. Fixed, Dscho
Re: [PATCH 21/22] sequencer: left-trim the lines read from the script
Hi Kuba, On Fri, 2 Sep 2016, Jakub Narębski wrote: > Hello Johannes, > > W dniu 01.09.2016 o 16:13, Johannes Schindelin pisze: > > On Thu, 1 Sep 2016, Jakub Narębski wrote: > > >> 'bol' is beginning-of-line, isn't it (a complement to eol)? > > > > Yep. How did you guess? :-) > > Wouldn't 'beg' and 'end' instead of 'bol' and 'eol' be easier > to understand, thus more readable? It is just consistency with the code I inherited: sequencer.c used 'bol' and 'eol' before. Ciao, Dscho
Re: [PATCH 21/22] sequencer: left-trim the lines read from the script
Hello Johannes, W dniu 01.09.2016 o 16:13, Johannes Schindelin pisze: > On Thu, 1 Sep 2016, Jakub Narębski wrote: >> 'bol' is beginning-of-line, isn't it (a complement to eol)? > > Yep. How did you guess? :-) Wouldn't 'beg' and 'end' instead of 'bol' and 'eol' be easier to understand, thus more readable? -- Jakub Narębski
Re: [PATCH 21/22] sequencer: left-trim the lines read from the script
Johannes Schindelin writes: >> > Interactive rebase's scripts may be indented; We need to handle this >> > case, too, now that we prepare the sequencer to process interactive >> > rebases. >> >> s/; We need/; we need/ > > Hrmpf. From http://grammar.ccc.commnet.edu/grammar/marks/colon.htm: > > There is some disagreement among writing reference manuals about > when you should capitalize an independent clause following a > colon. Most of the manuals advise that when you have more than one > sentence in your explanation or when your sentence(s) is a formal > quotation, a capital is a good idea. The NYPL Writer's Guide urges > consistency within a document; the Chicago Manual of Style says > you may begin an independent clause with a lowercase letter unless it's > one of those two things (a quotation or more than one sentence). > The APA Publication Manual is the most extreme: it advises us to > always capitalize an independent clause following a colon. The advice > given above is consistent with the Gregg Reference Manual. > > Based on that, I think that a capital is the correct case here. Does that manual have anything to say about semicolons, which is a different thing?
Re: [PATCH 21/22] sequencer: left-trim the lines read from the script
Hi Kuba, On Thu, 1 Sep 2016, Jakub Narębski wrote: > W dniu 29.08.2016 o 10:06, Johannes Schindelin pisze: > > Subject: [PATCH 21/22] sequencer: left-trim the lines read from the script > > In the subject, it should probably be without "the", as "lines" > are plural. > > s/left-trim the lines/left-trim lines/ I am happy that we stepped outside of the "code correctness" land into "grammar fix" land, as it surely means that you are convinced the code is correct? ;-) Fixed. > > Interactive rebase's scripts may be indented; We need to handle this > > case, too, now that we prepare the sequencer to process interactive > > rebases. > > s/; We need/; we need/ Hrmpf. From http://grammar.ccc.commnet.edu/grammar/marks/colon.htm: There is some disagreement among writing reference manuals about when you should capitalize an independent clause following a colon. Most of the manuals advise that when you have more than one sentence in your explanation or when your sentence(s) is a formal quotation, a capital is a good idea. The NYPL Writer's Guide urges consistency within a document; the Chicago Manual of Style says you may begin an independent clause with a lowercase letter unless it's one of those two things (a quotation or more than one sentence). The APA Publication Manual is the most extreme: it advises us to always capitalize an independent clause following a colon. The advice given above is consistent with the Gregg Reference Manual. Based on that, I think that a capital is the correct case here. > 'bol' is beginning-of-line, isn't it (a complement to eol)? Yep. How did you guess? :-) Ciao, Dscho
Re: [PATCH 21/22] sequencer: left-trim the lines read from the script
Hello Johannes, W dniu 29.08.2016 o 10:06, Johannes Schindelin pisze: Subject: [PATCH 21/22] sequencer: left-trim the lines read from the script In the subject, it should probably be without "the", as "lines" are plural. s/left-trim the lines/left-trim lines/ > Interactive rebase's scripts may be indented; We need to handle this > case, too, now that we prepare the sequencer to process interactive > rebases. s/; We need/; we need/ Nice little bit of scaffolding for sequencer-izing rebase -i. > > Signed-off-by: Johannes Schindelin > --- > sequencer.c | 3 +++ > 1 file changed, 3 insertions(+) Small change, easy to review. > > diff --git a/sequencer.c b/sequencer.c > index 0614b90..5efed2e 100644 > --- a/sequencer.c > +++ b/sequencer.c > @@ -864,6 +864,9 @@ static int parse_insn_line(struct todo_item *item, const > char *bol, char *eol) > char *end_of_object_name; > int i, saved, status, padding; > > + /* left-trim */ > + bol += strspn(bol, " \t"); > + Nice. Thanks for the comment. "left-trim" is better than "de-indent". 'bol' is beginning-of-line, isn't it (a complement to eol)? > for (i = 0; i < ARRAY_SIZE(todo_command_strings); i++) > if (skip_prefix(bol, todo_command_strings[i], &bol)) { > item->command = i; > -- Jakub Narębski