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

Re: fatal output from git-show really wants a terminal

From
Boyd Stephen Smith Jr. <bss03@volumehost.net>
Date
Dec 11, 2008, 22:45 UTC
Message-ID
<200812111645.10067.bss03@volumehost.net>
In-Reply-To
<20081211215554.GA11565@sigill.intra.peff.net>
On Thursday 2008 December 11 15:55:55 Jeff King wrote:
Show 7 quoted lines
>On Thu, Dec 11, 2008 at 10:51:15AM -0600, Boyd Stephen Smith Jr. wrote:
>> Initially, I was looking for 'stdout' or 'stderr', and found many
>> unrelated commits.  I then figured it was part of the PAGER support, and
>> began
>
>Try looking for isatty, which takes the numeric fd. I think the behavior
>you asked about would be this:

Thanks, this will be plenty of context for me to be able to crawl the archives and the actual history thinking about better behavior and considering old discussions.

Show 7 quoted lines
>We are not talking about
>interactivity, but rather about where the output is going. So your test
>would consider this interactive:
>
>  $ git log >foo.out
>
>and start a pager, which makes no sense.

Good point, I'll try and consider that while I investgate the history of the issue.

>Now if you proposed checking stderr and stdin _in addition_ to stdout,
>that might make more sense, but I haven't thought too hard about any
>implications.

I did see a commit message mentioning some unusual settings for PAGER, but in general, pagers are interactive. I'd think the default behavior would be "interactive <-> pager", with a config option to turn the pager always off or always on. From there, I would reason the test for interactivity should be the POSIX test.

It looks like this test have have been attempting to follow the behavior of --color=auto to GNU less and GNU grep (and possibly others). This certainly makes some sense as well, and may be less surprising.

>And FWIW, I don't recall this ever being discussed before, but then I
>have not been involved with git since the very beginning.

Google should be able to find it. And worst-case, I can tell wget to spider the archives and then run some sort of find/html2txt/grep on them.

I'll go back to "the stacks" and read the discussions and commits. If my well-informed self still thinks the behavior should change, I'll write a patch and open up the discussion again.

-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
bss03@volumehost.net                      ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.org/                      \_/     
Previous: Jeff KingNext: Jeff King
Message 8 of 13 in “fatal output from git-show really wants a terminal”
  1. Tim OlsenDec 10, 2008
  2. Boyd Stephen Smith Jr.Dec 10, 2008
  3. Johannes SixtDec 10, 2008
  4. Tim OlsenDec 10, 2008
  5. Boyd Stephen Smith Jr.Dec 10, 2008
  6. Boyd Stephen Smith Jr.Dec 11, 2008
  7. Jeff KingDec 11, 2008
  8. Boyd Stephen Smith Jr.Dec 11, 2008
  9. Jeff KingDec 11, 2008
  10. Junio C HamanoDec 11, 2008
  11. Junio C HamanoDec 15, 2008
  12. Junio C HamanoDec 15, 2008
  13. Jeff KingDec 15, 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.