{"thread":{"id":"60355","subject":"-q option for git to suppress informational messages?","startedAt":"2023-10-12T18:53:13Z","lastAt":"2023-10-13T06:49:21Z","messageCount":3,"participants":["Michal Suchánek","Emily Shaffer"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"483167","messageId":"20231012185308.GB6241@kitsune.suse.cz","threadId":"60355","inReplyTo":null,"subject":"-q option for git to suppress informational messages?","fromName":"Michal Suchánek","fromEmail":"msuchanek@suse.de","sentAt":"2023-10-12T18:53:08Z","receivedAt":"2023-10-12T18:53:13Z","isPatch":false,"sender":{"key":"msuchanek@suse.de","avatar":"https://avatars.githubusercontent.com/u/787652?v=4"},"body":"Hello,\n\nwhen using git in scripts I find that many git commands insist on\nprinting informational messages, and the only way to avoid this is to\nsent the output to /dev/null.\n\nWhile some select commands support the -q option to suppres\ninformational messages many don't.\n\nSince there was recenly some discussion of problems that newcomers could\nwork on I suppose this could be added to the list if not there already.\n\nThanks\n\nMichal\n"},{"id":"483174","messageId":"CAJoAoZ=MrjjfH6Noganejey0bAaB=d+jH_rXAqbscPG8E0m3Pw@mail.gmail.com","threadId":"60355","inReplyTo":"20231012185308.GB6241@kitsune.suse.cz","subject":"Re: -q option for git to suppress informational messages?","fromName":"Emily Shaffer","fromEmail":"nasamuffin@google.com","sentAt":"2023-10-12T20:46:09Z","receivedAt":"2023-10-12T20:46:27Z","isPatch":false,"sender":{"key":"nasamuffin@google.com","avatar":"https://avatars.githubusercontent.com/u/1606826?v=4"},"body":"On Thu, Oct 12, 2023 at 11:53 AM Michal Suchánek <msuchanek@suse.de> wrote:\n>\n> Hello,\n>\n> when using git in scripts I find that many git commands insist on\n> printing informational messages, and the only way to avoid this is to\n> sent the output to /dev/null.\n\nMichal, you might want to investigate further whether there is a\nplumbing-specific command that meets the needs you're concerned about\ninstead. Those commands will not have additional human-facing output,\nand have a stronger guarantee around backwards-compatibility than the\nhuman-facing commands do.\n\nCommands which count as \"plumbing\" can be located in `git help git` in\nthe full list of subcommands; if you're not sure what alternative to\nuse, I think you can feel free to describe what you're trying to do\nhere and get advice on which plumbing commands to use instead of\nporcelain ones.\n\n>\n> While some select commands support the -q option to suppres\n> informational messages many don't.\n>\n> Since there was recenly some discussion of problems that newcomers could\n> work on I suppose this could be added to the list if not there already.\n>\n> Thanks\n>\n> Michal\n"},{"id":"483191","messageId":"20231013064916.GC6241@kitsune.suse.cz","threadId":"60355","inReplyTo":"CAJoAoZ=MrjjfH6Noganejey0bAaB=d+jH_rXAqbscPG8E0m3Pw@mail.gmail.com","subject":"Re: -q option for git to suppress informational messages?","fromName":"Michal Suchánek","fromEmail":"msuchanek@suse.de","sentAt":"2023-10-13T06:49:16Z","receivedAt":"2023-10-13T06:49:21Z","isPatch":false,"sender":{"key":"msuchanek@suse.de","avatar":"https://avatars.githubusercontent.com/u/787652?v=4"},"body":"Hello,\n\nOn Thu, Oct 12, 2023 at 01:46:09PM -0700, Emily Shaffer wrote:\n> On Thu, Oct 12, 2023 at 11:53 AM Michal Suchánek <msuchanek@suse.de> wrote:\n> >\n> > Hello,\n> >\n> > when using git in scripts I find that many git commands insist on\n> > printing informational messages, and the only way to avoid this is to\n> > sent the output to /dev/null.\n> \n> Michal, you might want to investigate further whether there is a\n> plumbing-specific command that meets the needs you're concerned about\n> instead. Those commands will not have additional human-facing output,\n> and have a stronger guarantee around backwards-compatibility than the\n> human-facing commands do.\n> \n> Commands which count as \"plumbing\" can be located in `git help git` in\n> the full list of subcommands; if you're not sure what alternative to\n> use, I think you can feel free to describe what you're trying to do\n> here and get advice on which plumbing commands to use instead of\n> porcelain ones.\n\nI want to replicate the repository data between multiple machines.\n\nGit is 'distributed' VCS but AFAICS it supports replicating repositories\nvery poorly.\n\nIn one direction there is git push which has convenient --mirror option\nand also can be scripted to replicate only selected references. AFAICS\nthere is no lower level command that can be used. There are commands for\nuploading data to the remote repository but only push updates\nreferences, no -q option.\n\nIn the other direction there is git remote. Of course there is no\ncross-reference from git push, cross-references are for losers that\ndon't know everything about the thing. There are lower level commands\nthat could be used instead I suppose. Commands for downloading data are\navailable as well as for updating local references, and for one fetch\ndoes provide a -q option. Also unlike push git remote cannot operate on\ncommandline arguments alone, it requires configuration. Rewriting it\nusing lower level commands might bring the benefit of not requiring\nthat.\n\nHowever, this whole suggestion somewhat sounds along the lines\n - The shape of this chisel is not great, maybe it could be improved?\n - The other side of the hammer has an edge, maybe you could do\n   without a chisel?\n\nThanks\n\nMichal\n"}]}