On Mon, Mar 13, 2017 at 11:03:40AM +0100, Jean-Marc Lasgouttes wrote: > Le 07/03/2017 à 06:08, Scott Kostyshak a écrit : > > For the first patch, I changed the write() routine to add quotes around > > the branch name. Otherwise, read() gets confused. But should I instead > > have changed the read routine()? > > Lexer::quoteString does what you need. And actually you could just use Lexer > to read the arguments too (remember to pass 'true' to Lexer::next). That > would take care of all the uninteresting details.
That works well. > > I'm not sure the second patch is correct. The branch name won't work > > with a backslash at the end. I don't know how to fix this, because we > > don't store how many arguments there are. Ideally, we would have an > > argument class, right? > > You need to escape backslash too. Ah, of course. > Question, why don't you += to append stuff to a string? I just forget. I will do this for the next patch. I have a patch and it seems to work well. I want to clean it up before posting. I will post it again for review because even though it seems to work well, I wonder if there is a cleaner way of doing it. I will post a cleaned up version in a couple of days. Thanks, Scott
signature.asc
Description: PGP signature