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

Re: [PATCH 4/7] Clean up stripspace a bit, use strbuf even more.

From
Kristian Høgsberg <krh@redhat.com>
Date
Sep 18, 2007, 13:52 UTC
Message-ID
<1190123537.23692.2.camel@hinata.boston.redhat.com>
In-Reply-To
<Pine.LNX.4.64.0709181411200.28586@racer.site>
On Tue, 2007-09-18 at 14:12 +0100, Johannes Schindelin wrote:
Show 32 quoted lines
> Hi,
> 
> I really like your patch, except for this:
> 
> On Mon, 17 Sep 2007, Kristian Høgsberg wrote:
> 
> > diff --git a/builtin.h b/builtin.h
> > index 03ee7bf..d6f2c76 100644
> > --- a/builtin.h
> > +++ b/builtin.h
> > @@ -7,7 +7,6 @@ extern const char git_version_string[];
> >  extern const char git_usage_string[];
> >  
> >  extern void help_unknown_cmd(const char *cmd);
> > -extern size_t stripspace(char *buffer, size_t length, int skip_comments);
> >  extern int write_tree(unsigned char *sha1, int missing_ok, const char *prefix);
> >  extern void prune_packed_objects(int);
> >  
> > diff --git a/strbuf.h b/strbuf.h
> > index 21fc111..5960637 100644
> > --- a/strbuf.h
> > +++ b/strbuf.h
> > @@ -98,4 +98,6 @@ extern ssize_t strbuf_read(struct strbuf *, int fd, size_t hint);
> >  
> >  extern void read_line(struct strbuf *, FILE *, int);
> >  
> > +extern void stripspace(struct strbuf *buf, int skip_comments);
> > +
> >  #endif /* STRBUF_H */
> 
> If you do that, you have to move the function "stripspace" to strbuf.c, 
> too...

Right, the alternative is to #include strbuf.h in builtin.h, or maybe just add struct strbuf; at the top. And with Pierres latest patch strbuf is included everywhere, so maybe this is already moot.

Kristian
Previous: Johannes Schindelin
Message 18 of 18 in “Enable wt-status output to a given FILE pointer.”
  1. 1/7 Enable wt-status output to a given FILE pointer.Kristian Høgsberg, Sep 18, 2007
  2. 2/7 Enable wt-status to run against non-standard index file.Kristian Høgsberg, Sep 18, 2007
  3. 3/7 Introduce entry point for launching add--interactive.Kristian Høgsberg, Sep 18, 2007
  4. 4/7 Clean up stripspace a bit, use strbuf even more.Kristian Høgsberg, Sep 18, 2007
  5. 5/7 Add strbuf_read_file().Kristian Høgsberg, Sep 18, 2007
  6. 6/7 Export rerere() and launch_editor().Kristian Høgsberg, Sep 18, 2007
  7. 7/7 Implement git commit as a builtin command.Kristian Høgsberg, Sep 18, 2007
  8. Johannes SchindelinSep 18, 2007
  9. Kristian HøgsbergSep 18, 2007
  10. Junio C HamanoSep 20, 2007
  11. Kristian HøgsbergSep 21, 2007
  12. Junio C HamanoSep 21, 2007
  13. Kristian HøgsbergSep 24, 2007
  14. Johannes SchindelinSep 18, 2007
  15. Junio C HamanoSep 19, 2007
  16. Kristian HøgsbergSep 21, 2007
  17. Johannes SchindelinSep 18, 2007
  18. Kristian HøgsbergSep 18, 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.