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

Re: -q option for git to suppress informational messages?

From
Emily Shaffer <nasamuffin@google.com>
Date
Oct 12, 2023, 20:46 UTC
Message-ID
<CAJoAoZ=MrjjfH6Noganejey0bAaB=d+jH_rXAqbscPG8E0m3Pw@mail.gmail.com>
In-Reply-To
<20231012185308.GB6241@kitsune.suse.cz>
On Thu, Oct 12, 2023 at 11:53 AM Michal Suchánek <msuchanek@suse.de> wrote:
Show 6 quoted lines
>
> Hello,
>
> when using git in scripts I find that many git commands insist on
> printing informational messages, and the only way to avoid this is to
> sent the output to /dev/null.

Michal, you might want to investigate further whether there is a plumbing-specific command that meets the needs you're concerned about instead. Those commands will not have additional human-facing output, and have a stronger guarantee around backwards-compatibility than the human-facing commands do.

Commands which count as "plumbing" can be located in `git help git` in the full list of subcommands; if you're not sure what alternative to use, I think you can feel free to describe what you're trying to do here and get advice on which plumbing commands to use instead of porcelain ones.

Show 10 quoted lines
>
> While some select commands support the -q option to suppres
> informational messages many don't.
>
> Since there was recenly some discussion of problems that newcomers could
> work on I suppose this could be added to the list if not there already.
>
> Thanks
>
> Michal
Previous: Michal SuchánekNext: Michal Suchánek
Message 2 of 3 in “-q option for git to suppress informational messages?”
  1. Michal SuchánekOct 12, 2023
  2. Emily ShafferOct 12, 2023
  3. Michal SuchánekOct 13, 2023

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.