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

Re: [PATCH] git-rev-list: give better diagnostic for failed write

From
Jim Meyering <jim@meyering.net>
Date
Jun 27, 2007, 08:59 UTC
Message-ID
<87tzstpyck.fsf@rho.meyering.net>
In-Reply-To
<alpine.LFD.0.98.0706251505570.8675@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> wrote:
Show 6 quoted lines
> On Mon, 25 Jun 2007, Jim Meyering wrote:
>> Remember: I'm trying to improve existing code here.
>> You should save some of your ire for the person who wrote that code.
>
> Ehh. Remind me who I should be pissed at when the old code was _better_
> before your change?

If someone pointed out a bug in coreutils whereby a tool failed to give an accurate diagnostic, I would thank them (and honestly, I'd be grateful), even if their attempt at fixing it introduced a horrible bug. Of course, if the original bug were mine, I might be annoyed with myself, but certainly would not shoot the messenger.

> With the current git.c, we report write errors quite well.

Yes, I'm glad (in spite of the tone of much of your feedback) that my little improvements are making it into git.

> We don't give
> the exact output you want, but on a scale of 1-10, how important is that?
> Pretty damn low on the list.

If you get a report of a git write error, you might well appreciate knowing right away whether it was due to EIO or to ENOSPC.

> And the reason I'm really really irritated at you is that you ignore me
> when I tell you what your bugs are.
Be careful when throwing stones...
I mentioned (without making a fuss) a regression you introduced,
  http://thread.gmane.org/gmane.comp.version-control.git/50742/focus=50917
and you included similar code in a snippet in the very message to which
I'm replying now.  I do see that you omitted the troublesome ferror call
from your eventual patch.
>  - I *told* you that EPIPE is special. What did you do? Ignore my advice,
>    and made a broken patch that did exactly the opposite of what I told
>    you.

I did not ignore your advice. I considered it carefully and explained why I hold the opposing view. We've already beaten this to death, but for the record, I'd summarize it like this:

You and I have a difference of opinion. I firmly believe that it is unnecessary and counterproductive (it is prohibited by POSIX for many of the tools I maintain) to suppress an EPIPE diagnostic and to exit successfully in spite of a write error. Since EPIPE doesn't even arise in most normal situations, the only reason to do that is if you want to pander to the needs of some theoretical, broken-by-design (i.e., SIGPIPE-ignoring) git Porcelain program. You want to add such code to git, at every point where writing to stdout may fail.

Previous: Linus TorvaldsNext: Linus Torvalds
Message 29 of 33 in “git-rev-list: give better diagnostic for failed write”
  1. git-rev-list: give better diagnostic for failed writeJim Meyering, Jun 25, 2007
  2. Linus TorvaldsJun 25, 2007
  3. Jim MeyeringJun 25, 2007
  4. Linus TorvaldsJun 25, 2007
  5. Linus TorvaldsJun 25, 2007
  6. Linus TorvaldsJun 25, 2007
  7. Jim MeyeringJun 27, 2007
  8. Linus TorvaldsJun 25, 2007
  9. Theodore TsoJun 26, 2007
  10. Linus TorvaldsJun 26, 2007
  11. Theodore TsoJun 26, 2007
  12. Linus TorvaldsJun 26, 2007
  13. Theodore TsoJun 28, 2007
  14. Jeff KingJun 28, 2007
  15. Don't fflush(stdout) when it's not helpfulTheodore Tso, Jun 28, 2007
  16. Frank LichtenheldJun 29, 2007
  17. Theodore TsoJun 29, 2007
  18. Jeff KingJun 29, 2007
  19. Junio C HamanoJun 29, 2007
  20. Linus TorvaldsJun 29, 2007
  21. Theodore TsoJun 29, 2007
  22. Linus TorvaldsJun 29, 2007
  23. Junio C HamanoJun 30, 2007
  24. Linus TorvaldsJun 30, 2007
  25. Theodore TsoJun 30, 2007
  26. Junio C HamanoJun 30, 2007
  27. Jeff KingJun 26, 2007
  28. Linus TorvaldsJun 26, 2007
  29. Jim MeyeringJun 27, 2007
  30. Linus TorvaldsJun 27, 2007
  31. Jim MeyeringJun 25, 2007
  32. Linus TorvaldsJun 25, 2007
  33. Jim MeyeringJun 25, 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.