On Wed, 2007-07-18 at 23:27 +0200, Carlos Rica wrote: > 2007/7/18, Kristian Høgsberg <krh@xxxxxxxxxx>: > > + if (buffer) { > > + len = strip_lines(buffer, len); > > + > > + if (fwrite(buffer, 1, len, fp) < len) > > + die("could not write commit template: %s\n", > > + strerror(errno)); > > + } > .... > > + len = strip_lines(buffer, len); > > + > > + if (message_is_empty(buffer, len)) > > + die("* no commit message? aborting commit."); > > + > > Hi Kristian, you could call to the new stripspace() function > in builtin-stripspace.c, to reduce code in your file. The only > thing you should consider is that the new stripspace() > removes always the last '\n' in the file (if any), so you have to > add it when you need. Yup, I'm keeping an eye on all your changes, and it looks like it's all falling in place nicely. Once I have the last few pieces of functionality ported over I'll rebase and update builtin-commit to use the new functionality you've landed. A couple of things that might be interesting right now is: 1) pick out the test case I made for commit and get it upstream, and 2) take the changes I did to wt-status.c (making it able to run on a different index and output to a specified FILE pointer) and get that upstream. cheers, Kristian - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html