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

Re: [PATCH] grep: make show_line more portable

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 9, 2009, 09:50 UTC
Message-ID
<alpine.DEB.1.00.0903091049150.10279@pacific.mpi-cbg.de>
In-Reply-To
<7vbpsbic85.fsf@gitster.siamese.dyndns.org>
Hi,
On Sun, 8 Mar 2009, Junio C Hamano wrote:
Show 17 quoted lines
> Brian Gernhardt <benji@silverinsanity.com> writes:
> 
> > On Mar 8, 2009, at 10:22 PM, Jay Soffian wrote:
> >
> >> On Sun, Mar 8, 2009 at 9:15 PM, Brian Gernhardt
> >> <benji@silverinsanity.com> wrote:
> >>> On OS X the printf specifier "%.0s" outputs the entire string instead
> >>> of 0 characters as POSIX states.
> >>
> >> Does not reproduce for me:
> >
> > Nor for me, as I noted on the other thread...  And looking again, I
> > was reading the man page for printf(1), not printf(3).  Ouch.
> > *grumble, grumble*  I'm crawling back under my rock now.
> 
> Heh, people make mistakes and others are here to help spot them.
> Collectively we all win.
One of my favorite quotes these days:

The computer "doth make fools of us all," so that any fool without the ability to share a laugh on himself will be unable to tolerate programming for long. ''(Gerald M. Weinberg)''

> Thanks for a breakage report, initial fix and a confirmation.

Yes, I think this discussion was valuable, not only because it fixed a bug, but also because I learnt that %.*s with a negative length defaults to the total string.

Ciao, Dscho

Previous: Junio C HamanoNext: René Scharfe
Message 7 of 8 in “grep: make show_line more portable”
  1. grep: make show_line more portableBrian Gernhardt, Mar 9, 2009
  2. Junio C HamanoMar 9, 2009
  3. Jay SoffianMar 9, 2009
  4. Jay SoffianMar 9, 2009
  5. Brian GernhardtMar 9, 2009
  6. Junio C HamanoMar 9, 2009
  7. Johannes SchindelinMar 9, 2009
  8. René ScharfeMar 9, 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.