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

Re: [PATCH 2/4] Export some email and pretty-printing functions

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Feb 18, 2008, 19:07 UTC
Message-ID
<alpine.LNX.1.00.0802181245580.5816@iabervon.org>
In-Reply-To
<alpine.LSU.1.00.0802181241440.30505@racer.site>
On Mon, 18 Feb 2008, Johannes Schindelin wrote:
Show 32 quoted lines
> Hi,
> 
> On Sun, 17 Feb 2008, Daniel Barkalow wrote:
> 
> > diff --git a/commit.h b/commit.h
> > index 10e2b5d..42b4825 100644
> > --- a/commit.h
> > +++ b/commit.h
> > @@ -71,6 +71,21 @@ extern void pretty_print_commit(enum cmit_fmt fmt, const struct commit*,
> >                                  int abbrev, const char *subject,
> >                                  const char *after_subject, enum date_mode,
> >  				int non_ascii_present);
> > +void add_user_info(const char *what, enum cmit_fmt fmt, struct strbuf *sb,
> > +		   const char *line, enum date_mode dmode,
> > +		   const char *encoding);
> > +void pp_title_line(enum cmit_fmt fmt,
> > +		   const char **msg_p,
> > +		   struct strbuf *sb,
> > +		   const char *subject,
> > +		   const char *after_subject,
> > +		   const char *encoding,
> > +		   int plain_non_ascii);
> > +void pp_remainder(enum cmit_fmt fmt,
> > +		  const char **msg_p,
> > +		  struct strbuf *sb,
> > +		  int indent);
> > +
> 
> In addition to Junio's concern that add_user_info() really wants to be 
> called pp_add_user_info(), I cannot help myself but suspect that 
> pp_write_email_headers() -- which called for a new name, too -- also wants 
> to live in pretty.c.

Good idea, although I think "pp" is a verb about putting the result in the provided strbuf, so "pp_user_info()" and "pp_email_headers()".

It's different, currently, in that it actually outputs the headers, rather than putting them in a buffer and uses struct rev_info. I'll need to work on this some more.

	-Daniel
*This .sig left intentionally blank*
Previous: Johannes SchindelinNext: Daniel Barkalow
Message 5 of 6 in “Export some email and pretty-printing functions”
  1. 2/4 Export some email and pretty-printing functionsDaniel Barkalow, Feb 17, 2008
  2. Junio C HamanoFeb 18, 2008
  3. Daniel BarkalowFeb 18, 2008
  4. Johannes SchindelinFeb 18, 2008
  5. Daniel BarkalowFeb 18, 2008
  6. Daniel BarkalowFeb 18, 2008

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.