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

Re: [PATCH 1/8] builtin-apply: use warning() instead of fprintf(stderr, "warning: ")

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Feb 20, 2009, 09:41 UTC
Message-ID
<20090220094103.GY4371@genesis.frugalware.org>
In-Reply-To
<20090220030245.GC22419@coredump.intra.peff.net>
On Thu, Feb 19, 2009 at 10:02:45PM -0500, Jeff King <peff@peff.net> wrote:
Show 14 quoted lines
> On Thu, Feb 19, 2009 at 01:53:10PM +0100, Miklos Vajna wrote:
> 
> > @@ -2932,8 +2932,7 @@ static int write_out_one_reject(struct patch *patch)
> >  	cnt = strlen(patch->new_name);
> >  	if (ARRAY_SIZE(namebuf) <= cnt + 5) {
> >  		cnt = ARRAY_SIZE(namebuf) - 5;
> > -		fprintf(stderr,
> > -			"warning: truncating .rej filename to %.*s.rej",
> > +		warning("truncating .rej filename to %.*s.rej",
> >  			cnt - 1, patch->new_name);
> >  	}
> 
> Hmm. This hunk is actually changing behavior, as the original didn't
> have a newline. It looks like a bug in the original, though.
I think so. The change in 5/8 (git-rm) is a similar one.
Previous: Junio C HamanoNext: Miklos Vajna
Message 12 of 19 in “Change output "error: " to "Error: " etc”
  1. 5/6 Change output "error: " to "Error: " etcJohn Tapsell, Feb 19, 2009
  2. Thomas RastFeb 19, 2009
  3. Jeff KingFeb 19, 2009
  4. http-push: using error() and warning() as appropriateMiklos Vajna, Feb 19, 2009
  5. Jeff KingFeb 19, 2009
  6. 0/8 fprintf(stderr, "warning: ") -> warning() patchesMiklos Vajna, Feb 19, 2009
  7. 1/8 builtin-apply: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Feb 19, 2009
  8. Jeff KingFeb 20, 2009
  9. Junio C HamanoFeb 20, 2009
  10. Miklos VajnaMar 22, 2009
  11. Junio C HamanoMar 22, 2009
  12. Miklos VajnaFeb 20, 2009
  13. 2/8 builtin-checkout: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Feb 19, 2009
  14. 3/8 builtin-fetch-pack: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Feb 19, 2009
  15. 4/8 builtin-init-db: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Feb 19, 2009
  16. 5/8 builtin-rm: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Feb 19, 2009
  17. 6/8 builtin-show-branch: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Feb 19, 2009
  18. 7/8 builtin-show-ref: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Feb 19, 2009
  19. 8/8 refs: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Feb 19, 2009

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.