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

Re: [PATCH 2/3] Allow isatty to be overriden with GIT_FORCE_TTY

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 9, 2021, 18:41 UTC
Message-ID
<xmqqfswn72jj.fsf@gitster.g>
In-Reply-To
<CAJ-0Osx4A0NaY9f5Z-6_H2rfW-XwyDmW_7+OxKFt7WJaWOixSQ@mail.gmail.com>
Avishay Matayev <me@avishay.dev> writes:
Show 5 quoted lines
>> > If you don't find the approach in this patch good enough, what exactly
>> > do you suggest?
>>
>> Start with not tying this feature with the word "TTY", probably.
> Well then, what are other indicators of 'interactivity' besides "TTY"?

If we want to force output to always go through the pager, we should call it "force pager", not "force tty". If we want to always show progress bar no matter where the output goes, we should call it "force progress", not "force tty". These should be controllable independenty, even though it is OK to have catch all "force everything" for convenience.

There is no inherent reason why the output has to be passed through the pager when it goes to tty. It merely is how we happen to have designed the heuristics. We don't want to carve it in stone and expose it on end-users with a poorly chosen name. Also, we do not want to tie multiple features unnecessarily.

Previous: Avishay MatayevNext: Avishay Matayev
Message 10 of 13 in “Override isatty with GIT_FORCE_TTY”
  1. 0/3 Override isatty with GIT_FORCE_TTYAvishay Matayev, Jul 6, 2021
  2. 1/3 Change isatty's parameter to a *_FILENO defineAvishay Matayev, Jul 6, 2021
  3. Junio C HamanoJul 6, 2021
  4. Avishay MatayevJul 9, 2021
  5. 2/3 Allow isatty to be overriden with GIT_FORCE_TTYAvishay Matayev, Jul 6, 2021
  6. Junio C HamanoJul 6, 2021
  7. Avishay MatayevJul 9, 2021
  8. Junio C HamanoJul 9, 2021
  9. Avishay MatayevJul 9, 2021
  10. Junio C HamanoJul 9, 2021
  11. Avishay MatayevJul 9, 2021
  12. 3/3 Add tests for GIT_FORCE_TTYAvishay Matayev, Jul 6, 2021
  13. Avishay MatayevJul 30, 2021

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.