git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Implement git commit as a builtin.

From
Kristian Høgsberg <krh@redhat.com>
Date
Jul 20, 2007, 14:45 UTC
Message-ID
<1184942724.26967.105.camel@hinata.boston.redhat.com>
In-Reply-To
<1b46aba20707181427y12bd8b62pe30df61219e7c1f7@mail.gmail.com>
On Wed, 2007-07-18 at 23:27 +0200, Carlos Rica wrote:
Show 20 quoted lines
> 2007/7/18, Kristian Høgsberg <krh@redhat.com>:
> > +       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

Previous: Carlos Rica
Message 4 of 4 in “Implement git commit as a builtin.”
  1. Implement git commit as a builtin.Kristian Høgsberg, Jul 18, 2007
  2. Nicolas PitreJul 18, 2007
  3. Carlos RicaJul 18, 2007
  4. Kristian HøgsbergJul 20, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.