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

[BUG] git help -a should no use page when in pipe

From
许许铖 <thexuc@gmail.com>
Date
Dec 11, 2018, 06:26 UTC
Message-ID
<CALmyJ=OaZAgr1i1DXMRQqCVWnKvO=QZH6AeGj8YfKMxAnRz6GA@mail.gmail.com>
To whom may concern,

Since git 2.20.0, invoking `git help -a` will cause git using page (e.g. less) to display help message. However, such behaviour is not desirable when `git help -a` is run inside a pipe or invoked by another program.

Step to reproduce the bug:
     git help -a | cat # this freezes the command line prompt.

This bug also causes issues in `hub` when invoking `git <alias>`. More detail can be found at https://github.com/github/hub/issues/1963

I would suggest `git help -a` only invokes page when stdout is a tty.
Thanks for your attention.

Best Regards, Cheng

Next: Junio C Hamano
Message 1 of 2 in “[BUG] git help -a should no use page when in pipe”
  1. 许铖Dec 11, 2018
  2. Junio C HamanoDec 11, 2018

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.