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

Re: Output of git checkout goes to stderr

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 30, 2024, 15:45 UTC
Message-ID
<xmqqed7ag9y7.fsf@gitster.g>
In-Reply-To
<CAFGW38fkr+OuhpcyqNFxZNkhNDGPxTbOmCJLVHpCGUmbj05tMg@mail.gmail.com>
Sayooj Surendran <sayooj.surendran@bigbinary.com> writes:
> Noticed that the output of git checkout command is going to stderr
> channel. Is this an intended behaviour?

Show messages meant for human consumptions (not just errors and warnings, but informational messages and eye-candy progress bars) to the standard error stream, and using the standard output stream to show what informational commands are asked to produce (e.g. running "git status" would describe the status of the current working tree to the standard output stream), is very much in line with the original design we laid out in 2005 when Git was still very young, and continues to be "intended" behaviour to this day.

Previous: Karthik Nayak
Message 4 of 4 in “Output of git checkout goes to stderr”
  1. Sayooj SurendranJul 30, 2024
  2. Eric SunshineJul 30, 2024
  3. Karthik NayakJul 30, 2024
  4. Junio C HamanoJul 30, 2024

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.