* -q option for git to suppress informational messages? @ 2023-10-12 18:53 Michal Suchánek 2023-10-12 20:46 ` Emily Shaffer 0 siblings, 1 reply; 3+ messages in thread From: Michal Suchánek @ 2023-10-12 18:53 UTC (permalink / raw) To: git 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. 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: -q option for git to suppress informational messages? 2023-10-12 18:53 -q option for git to suppress informational messages? Michal Suchánek @ 2023-10-12 20:46 ` Emily Shaffer 2023-10-13 6:49 ` Michal Suchánek 0 siblings, 1 reply; 3+ messages in thread From: Emily Shaffer @ 2023-10-12 20:46 UTC (permalink / raw) To: Michal Suchánek; +Cc: git On Thu, Oct 12, 2023 at 11:53 AM Michal Suchánek <msuchanek@suse.de> wrote: > > 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. > > 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: -q option for git to suppress informational messages? 2023-10-12 20:46 ` Emily Shaffer @ 2023-10-13 6:49 ` Michal Suchánek 0 siblings, 0 replies; 3+ messages in thread From: Michal Suchánek @ 2023-10-13 6:49 UTC (permalink / raw) To: Emily Shaffer; +Cc: git Hello, On Thu, Oct 12, 2023 at 01:46:09PM -0700, Emily Shaffer wrote: > On Thu, Oct 12, 2023 at 11:53 AM Michal Suchánek <msuchanek@suse.de> wrote: > > > > 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. I want to replicate the repository data between multiple machines. Git is 'distributed' VCS but AFAICS it supports replicating repositories very poorly. In one direction there is git push which has convenient --mirror option and also can be scripted to replicate only selected references. AFAICS there is no lower level command that can be used. There are commands for uploading data to the remote repository but only push updates references, no -q option. In the other direction there is git remote. Of course there is no cross-reference from git push, cross-references are for losers that don't know everything about the thing. There are lower level commands that could be used instead I suppose. Commands for downloading data are available as well as for updating local references, and for one fetch does provide a -q option. Also unlike push git remote cannot operate on commandline arguments alone, it requires configuration. Rewriting it using lower level commands might bring the benefit of not requiring that. However, this whole suggestion somewhat sounds along the lines - The shape of this chisel is not great, maybe it could be improved? - The other side of the hammer has an edge, maybe you could do without a chisel? Thanks Michal ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-13 6:49 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-10-12 18:53 -q option for git to suppress informational messages? Michal Suchánek 2023-10-12 20:46 ` Emily Shaffer 2023-10-13 6:49 ` Michal Suchánek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox