{"thread":{"id":"42315","subject":"git push --quiet option does not seem to work","startedAt":"2016-05-13T21:21:30Z","lastAt":"2016-05-17T00:06:06Z","messageCount":14,"participants":["Chris B","Jeff King","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"286508","messageId":"CADKp0pwHKvfSDG_-4p5tUn0_QiUGKzmRj5RwphfA8sZ_7CVHqw@mail.gmail.com","threadId":"42315","inReplyTo":null,"subject":"git push --quiet option does not seem to work","fromName":"Chris B","fromEmail":"chris.blaszczynski@gmail.com","sentAt":"2016-05-13T21:21:30Z","receivedAt":"2016-05-13T21:21:30Z","isPatch":false,"sender":{"key":"chris.blaszczynski@gmail.com","avatar":null},"body":"Hi I am using 2.8.2.windows.1 and writing Powershell scripts doing\nsome Git stuff.\n\nI have to use the --quiet option for git because it constantly outputs\nprogress to stderr.\n\nHowever, it seems that --quiet does not actually work in git push. The\noutput still goes to stderr.\nWhen there are changes committed to push it always outputs something\nto stderr. If there is nothing to push, then it actually is silent.\n"},{"id":"286511","messageId":"20160513223336.GA18287@sigill.intra.peff.net","threadId":"42315","inReplyTo":"CADKp0pwHKvfSDG_-4p5tUn0_QiUGKzmRj5RwphfA8sZ_7CVHqw@mail.gmail.com","subject":"Re: git push --quiet option does not seem to work","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-05-13T22:33:37Z","receivedAt":"2016-05-13T22:33:37Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, May 13, 2016 at 05:21:30PM -0400, Chris B wrote:\n\n> Hi I am using 2.8.2.windows.1 and writing Powershell scripts doing\n> some Git stuff.\n> \n> I have to use the --quiet option for git because it constantly outputs\n> progress to stderr.\n> \n> However, it seems that --quiet does not actually work in git push. The\n> output still goes to stderr.\n> When there are changes committed to push it always outputs something\n> to stderr. If there is nothing to push, then it actually is silent.\n\nCan you be more specific? It seems to work for me:\n\n  $ rm -rf dst.git &&\n    git init --bare -q dst.git &&\n    git push dst.git\n  Counting objects: 6, done.\n  Delta compression using up to 8 threads.\n  Compressing objects: 100% (3/3), done.\n  Writing objects: 100% (6/6), 441 bytes | 0 bytes/s, done.\n  Total 6 (delta 0), reused 0 (delta 0)\n  To dst.git\n   * [new branch]      master -> master\n\n  $ rm -rf dst.git &&\n    git init --bare -q dst.git &&\n    git push -q dst.git\n  [no output]\n\nAre you seeing progress reporting, the status table, or something else?\nAre you using a particular protocol that might invoke a git-remote-*\nhelper that doesn't respect the quiet flag?\n\n-Peff\n"},{"id":"286604","messageId":"CADKp0pw5FFDVvPz0CcjOTYteQ9jFn2jBZwaX6_n8r3UQRGcGdQ@mail.gmail.com","threadId":"42315","inReplyTo":"20160513223336.GA18287@sigill.intra.peff.net","subject":"Re: git push --quiet option does not seem to work","fromName":"Chris B","fromEmail":"chris.blaszczynski@gmail.com","sentAt":"2016-05-15T20:29:36Z","receivedAt":"2016-05-15T20:29:36Z","isPatch":false,"sender":{"key":"chris.blaszczynski@gmail.com","avatar":null},"body":"Try it by making some changes to files and committing them, and then push.\nIt works fine for me when there is nothing to actually push, but not\nso when there are commits to push.\n\nIt always outputs the progress to STDERR even when I add --quiet.\n\n\n\nOn Fri, May 13, 2016 at 6:33 PM, Jeff King <peff@peff.net> wrote:\n> On Fri, May 13, 2016 at 05:21:30PM -0400, Chris B wrote:\n>\n>> Hi I am using 2.8.2.windows.1 and writing Powershell scripts doing\n>> some Git stuff.\n>>\n>> I have to use the --quiet option for git because it constantly outputs\n>> progress to stderr.\n>>\n>> However, it seems that --quiet does not actually work in git push. The\n>> output still goes to stderr.\n>> When there are changes committed to push it always outputs something\n>> to stderr. If there is nothing to push, then it actually is silent.\n>\n> Can you be more specific? It seems to work for me:\n>\n>   $ rm -rf dst.git &&\n>     git init --bare -q dst.git &&\n>     git push dst.git\n>   Counting objects: 6, done.\n>   Delta compression using up to 8 threads.\n>   Compressing objects: 100% (3/3), done.\n>   Writing objects: 100% (6/6), 441 bytes | 0 bytes/s, done.\n>   Total 6 (delta 0), reused 0 (delta 0)\n>   To dst.git\n>    * [new branch]      master -> master\n>\n>   $ rm -rf dst.git &&\n>     git init --bare -q dst.git &&\n>     git push -q dst.git\n>   [no output]\n>\n> Are you seeing progress reporting, the status table, or something else?\n> Are you using a particular protocol that might invoke a git-remote-*\n> helper that doesn't respect the quiet flag?\n>\n> -Peff\n"},{"id":"286605","messageId":"CADKp0pwrKzHG7KVSMH+6OHuv9sKXTcKSsdKMEZ_fFdjWT+kW6g@mail.gmail.com","threadId":"42315","inReplyTo":"CADKp0pw5FFDVvPz0CcjOTYteQ9jFn2jBZwaX6_n8r3UQRGcGdQ@mail.gmail.com","subject":"Re: git push --quiet option does not seem to work","fromName":"Chris B","fromEmail":"chris.blaszczynski@gmail.com","sentAt":"2016-05-15T20:34:08Z","receivedAt":"2016-05-15T20:34:08Z","isPatch":false,"sender":{"key":"chris.blaszczynski@gmail.com","avatar":null},"body":"By the way, I also notice by your prompt you seem to be testing this\nin Linux. I did indicate I'm using the Windows version. That might\nmake a difference.\n\n\nOn Sun, May 15, 2016 at 4:29 PM, Chris B <chris.blaszczynski@gmail.com> wrote:\n> Try it by making some changes to files and committing them, and then push.\n> It works fine for me when there is nothing to actually push, but not\n> so when there are commits to push.\n>\n> It always outputs the progress to STDERR even when I add --quiet.\n>\n>\n>\n> On Fri, May 13, 2016 at 6:33 PM, Jeff King <peff@peff.net> wrote:\n>> On Fri, May 13, 2016 at 05:21:30PM -0400, Chris B wrote:\n>>\n>>> Hi I am using 2.8.2.windows.1 and writing Powershell scripts doing\n>>> some Git stuff.\n>>>\n>>> I have to use the --quiet option for git because it constantly outputs\n>>> progress to stderr.\n>>>\n>>> However, it seems that --quiet does not actually work in git push. The\n>>> output still goes to stderr.\n>>> When there are changes committed to push it always outputs something\n>>> to stderr. If there is nothing to push, then it actually is silent.\n>>\n>> Can you be more specific? It seems to work for me:\n>>\n>>   $ rm -rf dst.git &&\n>>     git init --bare -q dst.git &&\n>>     git push dst.git\n>>   Counting objects: 6, done.\n>>   Delta compression using up to 8 threads.\n>>   Compressing objects: 100% (3/3), done.\n>>   Writing objects: 100% (6/6), 441 bytes | 0 bytes/s, done.\n>>   Total 6 (delta 0), reused 0 (delta 0)\n>>   To dst.git\n>>    * [new branch]      master -> master\n>>\n>>   $ rm -rf dst.git &&\n>>     git init --bare -q dst.git &&\n>>     git push -q dst.git\n>>   [no output]\n>>\n>> Are you seeing progress reporting, the status table, or something else?\n>> Are you using a particular protocol that might invoke a git-remote-*\n>> helper that doesn't respect the quiet flag?\n>>\n>> -Peff\n"},{"id":"286609","messageId":"20160515212332.GB31809@sigill.intra.peff.net","threadId":"42315","inReplyTo":"CADKp0pwrKzHG7KVSMH+6OHuv9sKXTcKSsdKMEZ_fFdjWT+kW6g@mail.gmail.com","subject":"Re: git push --quiet option does not seem to work","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-05-15T21:23:32Z","receivedAt":"2016-05-15T21:23:32Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, May 15, 2016 at 04:29:36PM -0400, Chris B wrote:\n\n> Try it by making some changes to files and committing them, and then push.\n> It works fine for me when there is nothing to actually push, but not\n> so when there are commits to push.\n\nIn my example there were commits to push.\n\nAs you noted, my test was on Linux, so it's certainly possible that it's\nWindows-specific. What protocol are you pushing over (e.g., http follows\na very different code path for progress)?\n\n-Peff\n"},{"id":"286633","messageId":"CADKp0pzPOdcSfBESzGMhrY5itSa4KDeOQ2VgwewuwH8CGZcwCw@mail.gmail.com","threadId":"42315","inReplyTo":"20160515212332.GB31809@sigill.intra.peff.net","subject":"Re: git push --quiet option does not seem to work","fromName":"Chris B","fromEmail":"chris.blaszczynski@gmail.com","sentAt":"2016-05-16T00:51:53Z","receivedAt":"2016-05-16T00:51:53Z","isPatch":false,"sender":{"key":"chris.blaszczynski@gmail.com","avatar":null},"body":"I did not see in your example any commit. But if you say so.\nI saw git init which would be a new repo.. don't know if it makes a difference.\n\nIt's pushing to HTTPS.\n\nI can provide the real example tomorrow.\n"},{"id":"286634","messageId":"20160516005824.GA1963@sigill.intra.peff.net","threadId":"42315","inReplyTo":"CADKp0pzPOdcSfBESzGMhrY5itSa4KDeOQ2VgwewuwH8CGZcwCw@mail.gmail.com","subject":"Re: git push --quiet option does not seem to work","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-05-16T00:58:24Z","receivedAt":"2016-05-16T00:58:24Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, May 15, 2016 at 08:51:53PM -0400, Chris B wrote:\n\n> I did not see in your example any commit. But if you say so.\n\nI didn't show the commit step. But you can see that I made two identical\npushes, one quiet and one not, and the non-quiet one actually pushed\ncommits and showed the progress meter.\n\nThat doesn't help with your problem, though...\n\n> I saw git init which would be a new repo.. don't know if it makes a difference.\n> \n> It's pushing to HTTPS.\n\nI repeated my test pushing over https, but it still seems to work as\nexpected with \"-q\".  So perhaps it is just Windows-specific, or perhaps\nthere's something else going on.\n\n-Peff\n"},{"id":"286655","messageId":"CADKp0pzOLs5g9Jc6_sA6jr-XOifx0Yn6b7wDW2qcC2UB5Q_WPQ@mail.gmail.com","threadId":"42315","inReplyTo":"20160516005824.GA1963@sigill.intra.peff.net","subject":"Re: git push --quiet option does not seem to work","fromName":"Chris B","fromEmail":"chris.blaszczynski@gmail.com","sentAt":"2016-05-16T13:13:20Z","receivedAt":"2016-05-16T13:13:20Z","isPatch":false,"sender":{"key":"chris.blaszczynski@gmail.com","avatar":null},"body":"PS H:\\test-ps\\myrepo> \"hi\" >> whatever\n\nPS H:\\test-ps\\myrepo> git add .\n\nPS H:\\test-ps\\myrepo> git commit -m 'boo'\n[test1 3cde450] boo\n Committer: xxxxxxxxxxxxxxxx\nYour name and email address were configured automatically based\non your username and hostname. Please check that they are accurate.\nYou can suppress this message by setting them explicitly. Run the\nfollowing command and follow the instructions in your editor to edit\nyour configuration file:\n\n    git config --global --edit\n\nAfter doing this, you may fix the identity used for this commit with:\n\n    git commit --amend --reset-author\n\n 1 file changed, 0 insertions(+), 0 deletions(-)\n\nPS H:\\test-ps\\myrepo> git push --quiet\ngit : remote:\nAt line:1 char:1\n+ git push --quiet\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n    + CategoryInfo          : NotSpecified: (remote: :String) [],\nRemoteException\n    + FullyQualifiedErrorId : NativeCommandError\n\nremote: Analyzing objects... (3/3) (119 ms)\nremote: Storing packfile... done (113 ms)\nremote: Storing index... done (29 ms)\n"},{"id":"286657","messageId":"alpine.DEB.2.20.1605161526510.3303@virtualbox","threadId":"42315","inReplyTo":"CADKp0pzOLs5g9Jc6_sA6jr-XOifx0Yn6b7wDW2qcC2UB5Q_WPQ@mail.gmail.com","subject":"Re: git push --quiet option does not seem to work","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-05-16T13:28:30Z","receivedAt":"2016-05-16T13:28:30Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Chris,\n\ncould you please quote just the parts of the mail you are replying to, and\n*not* top-post? It would be appreciated.\n\nOn Mon, 16 May 2016, Chris B wrote:\n\n> PS H:\\test-ps\\myrepo> git push --quiet\n> git : remote:\n> At line:1 char:1\n> + git push --quiet\n> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n>     + CategoryInfo          : NotSpecified: (remote: :String) [],\n> RemoteException\n>     + FullyQualifiedErrorId : NativeCommandError\n> \n> remote: Analyzing objects... (3/3) (119 ms)\n> remote: Storing packfile... done (113 ms)\n> remote: Storing index... done (29 ms)\n\nSo it actually works, eh?\n\nCould you please verify that this is a PowerShell-only problem by\nperforming a similar push in Git CMD and in Git Bash?\n\nCiao,\nJohannes\n"},{"id":"286659","messageId":"20160516133731.GA6903@sigill.intra.peff.net","threadId":"42315","inReplyTo":"alpine.DEB.2.20.1605161526510.3303@virtualbox","subject":"Re: git push --quiet option does not seem to work","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-05-16T13:37:31Z","receivedAt":"2016-05-16T13:37:31Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, May 16, 2016 at 03:28:30PM +0200, Johannes Schindelin wrote:\n\n> > PS H:\\test-ps\\myrepo> git push --quiet\n> > git : remote:\n> > At line:1 char:1\n> > + git push --quiet\n> > + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n> >     + CategoryInfo          : NotSpecified: (remote: :String) [],\n> > RemoteException\n> >     + FullyQualifiedErrorId : NativeCommandError\n> > \n> > remote: Analyzing objects... (3/3) (119 ms)\n> > remote: Storing packfile... done (113 ms)\n> > remote: Storing index... done (29 ms)\n> \n> So it actually works, eh?\n> \n> Could you please verify that this is a PowerShell-only problem by\n> performing a similar push in Git CMD and in Git Bash?\n\nI don't know much about PowerShell, but presumably it is responsible for\nthe first few lines.\n\nBut there is something else going on, too, which is those \"remote:\"\nlines. Those are being relayed from the server by the git client. I\ndon't think it would be correct for the client to suppress them, even\nwith \"--quiet\", because the client side has no idea if they are progress\njunk or critical error messages.\n\nThe client _does_ pass along the \"quiet\" flag to the server via the git\nprotocol, so it should be the server's responsibility to drop progress\noutput when it is present. The server side here is clearly not stock\ngit, from the content of those progress messages (some googling shows it\nlooks like whatever visualstudio.com is running, but I don't know what\nthat is). So either the server implementation doesn't support the\n\"quiet\" protocol extension, or it is ignoring it. It might be worth\nfiling a bug with them.\n\n-Peff\n"},{"id":"286661","messageId":"CADKp0px3v3K4vqNeNk7NdWZFdSCyqMa+i_Nv0wW80Tkf0C=RUQ@mail.gmail.com","threadId":"42315","inReplyTo":"20160516133731.GA6903@sigill.intra.peff.net","subject":"Re: git push --quiet option does not seem to work","fromName":"Chris B","fromEmail":"chris.blaszczynski@gmail.com","sentAt":"2016-05-16T14:32:00Z","receivedAt":"2016-05-16T14:32:00Z","isPatch":false,"sender":{"key":"chris.blaszczynski@gmail.com","avatar":null},"body":"Once I included the whole email in my reply, but otherwise I deleted it all.\n\nAnyway, it is not a Powershell thing. I tested on another repo on\nGitHub and it worked as expected. So I guess indeed the problem lies\nwith Microsoft's implementation.\n"},{"id":"286662","messageId":"alpine.DEB.2.20.1605161700360.3303@virtualbox","threadId":"42315","inReplyTo":"CADKp0px3v3K4vqNeNk7NdWZFdSCyqMa+i_Nv0wW80Tkf0C=RUQ@mail.gmail.com","subject":"Re: git push --quiet option does not seem to work","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-05-16T15:04:34Z","receivedAt":"2016-05-16T15:04:34Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Chris,\n\nOn Mon, 16 May 2016, Chris B wrote:\n\n> Once I included the whole email in my reply, but otherwise I deleted it\n> all.\n\nBoth are bad practice. If you are considerate with the reader's time, this\nconsideration is typically reprocicated. So it is a good idea to save the\nreader time by giving them the precise context they need.\n\n> Anyway, it is not a Powershell thing. I tested on another repo on\n> GitHub and it worked as expected. So I guess indeed the problem lies\n> with Microsoft's implementation.\n\nThis is *really* unclear.\n\nWhat \"Microsoft's implementation\"??? Do you refer to VSTS, or do you refer\nto Git for Windows, or PowerShell?\n\nPlease. To make it really simple for everybody involved, try to repeat as\nclosely as possible the same push from PowerShell, Git CMD and Git Bash.\nWe want to compare oranges to oranges.\n\nFWIW You can repeat the same push by force-pushing the previous state\nbetween re-runs. E.g.\n\n\tgit push myremote HEAD^:my-branch\n\tgit push myremote my-branch\n\nCiao,\nJohannes\n"},{"id":"286663","messageId":"20160516151721.GA8678@sigill.intra.peff.net","threadId":"42315","inReplyTo":"alpine.DEB.2.20.1605161700360.3303@virtualbox","subject":"Re: git push --quiet option does not seem to work","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-05-16T15:17:21Z","receivedAt":"2016-05-16T15:17:21Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, May 16, 2016 at 05:04:34PM +0200, Johannes Schindelin wrote:\n\n> > Anyway, it is not a Powershell thing. I tested on another repo on\n> > GitHub and it worked as expected. So I guess indeed the problem lies\n> > with Microsoft's implementation.\n> \n> This is *really* unclear.\n> \n> What \"Microsoft's implementation\"??? Do you refer to VSTS, or do you refer\n> to Git for Windows, or PowerShell?\n> \n> Please. To make it really simple for everybody involved, try to repeat as\n> closely as possible the same push from PowerShell, Git CMD and Git Bash.\n> We want to compare oranges to oranges.\n\nI don't think there is much to debug there. According to\n\n  http://superuser.com/questions/213848/using-powershell-call-native-command-line-app-and-capture-stderr/462362#462362\n\nand other sources, it looks like PowerShell is very picky about calling\nprograms which produce any output on stderr, and may in an error object.\nSo I think both Powershell and Git are working as advertised, it's just\nthat their behaviors are incompatible.\n\nThe \"bug\" is that the server is asking the client to write non-error\noutput to stderr, even though the client should have asked the server to\nbe quiet (though it would not hurt to check that it is doing so by\nlooking at the output of GIT_TRACE_PACKET).\n\n-Peff\n"},{"id":"286745","messageId":"CADKp0px_RzPwwyFVQ6oNE6dn1QNtVUjJ9zCUSgfSn6mdkOrgfQ@mail.gmail.com","threadId":"42315","inReplyTo":"20160516151721.GA8678@sigill.intra.peff.net","subject":"Re: git push --quiet option does not seem to work","fromName":"Chris B","fromEmail":"chris.blaszczynski@gmail.com","sentAt":"2016-05-17T00:06:06Z","receivedAt":"2016-05-17T00:06:06Z","isPatch":false,"sender":{"key":"chris.blaszczynski@gmail.com","avatar":null},"body":">> Once I included the whole email in my reply, but otherwise I deleted it\n>> all.\n\n> Both are bad practice. If you are considerate with the reader's time, this\n> consideration is typically reprocicated. So it is a good idea to save the\n> reader time by giving them the precise context they need.\n\nThis is among a few reasons I don't understand why in 2016 we use mail\nlists for this kind of stuff. First time I've had to deal with this\nsince the 1990's so I forgot how it works.\n\nOn Mon, May 16, 2016 at 11:17 AM, Jeff King <peff@peff.net> wrote:\n> On Mon, May 16, 2016 at 05:04:34PM +0200, Johannes Schindelin wrote:\n>\n>> > Anyway, it is not a Powershell thing. I tested on another repo on\n>> > GitHub and it worked as expected. So I guess indeed the problem lies\n>> > with Microsoft's implementation.\n>>\n>> This is *really* unclear.\n>>\n>> What \"Microsoft's implementation\"??? Do you refer to VSTS, or do you refer\n>> to Git for Windows, or PowerShell?\n>>\n>> Please. To make it really simple for everybody involved, try to repeat as\n>> closely as possible the same push from PowerShell, Git CMD and Git Bash.\n>> We want to compare oranges to oranges.\n\nAs I was mentioning GitHub I assumed \"Microsoft implementation\" would\nindicate their hosted Git service \"Visual Studio Team Services\".\n\nI really didn't think there was anything else to provide. The feedback\nlead me to test with Github and with that I verified that when the\nremote was for Github it worked, but when the remote was VSTS it was\nnot.. and \"not working\" means not paying attention to \"--quiet\"\nsetting only with git push, while it does work for other commands such\nas clone. (though I think I have to re-test with pull.)\n\nThe problem is not with Powershell (though how it handles seeing\noutput in STDERR is not anything I agree with). I was merely trying to\npoint out that 'git push --quiet' was not working until we realized it\nwas with VSTS.\n\nThis \"ticket\" if it exists as such in a maillist can be closed.\n\nI think this accurately sums it up:\n\n> The \"bug\" is that the server is asking the client to write non-error\n> output to stderr, even though the client should have asked the server to\n> be quiet (though it would not hurt to check that it is doing so by\n> looking at the output of GIT_TRACE_PACKET).\n>\n> -Peff\n"}]}