{"thread":{"id":"33748","subject":"stdout versus stderr for cmd line git","startedAt":"2013-05-08T01:48:33Z","lastAt":"2013-05-10T03:28:43Z","messageCount":2,"participants":["Michael Hunley","Jonathan Nieder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"216676","messageId":"CAKk5qjVoDUzeurgAL51jixXsm4rJCMCDf620vAv_Gsafk8N7iA@mail.gmail.com","threadId":"33748","inReplyTo":null,"subject":"stdout versus stderr for cmd line git","fromName":"Michael Hunley","fromEmail":"michael@codecobblers.com","sentAt":"2013-05-08T01:48:33Z","receivedAt":"2013-05-08T01:48:33Z","isPatch":false,"sender":{"key":"michael@codecobblers.com","avatar":null},"body":"I have been building some automated patching scripts to update\nmultiple servers at once from our dev host.  In doing so I ran into\nsome oddities with linux command line GIT version 1.8.0-rc0, so a\ncouple minor revisions behind.\n\nFirst, a \"git pull\" puts the list of branches updated onto stderr.\nThese are not errors and should be on stdout.  E.g.\nFiltered error: From <git host>:service-framework\nFiltered error:    017f911..b1f72db  patching   -> origin/patching\n\nOk, we can filter that out.  But worse is that actual errors in a pull\nrequest are sent to stdout instead of standard error.  For example,\nmerge conflicts or pull failures because you have unstaged changes.\n\nFor now I have to merge all stdout to stderr on my git requests in my\npatching script, then filter the results to find the real errors.\n\nCan we please make it so all actual errors appear on stderr, but not non-errors?\n\nIf this was fixed in 1.8.2 latest, please forgive as I am running fast\nand furious to get this available tonight.\n\nthanks\n"},{"id":"216846","messageId":"20130510032843.GA12036@elie","threadId":"33748","inReplyTo":"CAKk5qjVoDUzeurgAL51jixXsm4rJCMCDf620vAv_Gsafk8N7iA@mail.gmail.com","subject":"Re: stdout versus stderr for cmd line git","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-05-10T03:28:43Z","receivedAt":"2013-05-10T03:28:43Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nMichael Hunley wrote:\n\n> Ok, we can filter that out.  But worse is that actual errors in a pull\n> request are sent to stdout instead of standard error.  For example,\n> merge conflicts or pull failures because you have unstaged changes.\n\nYes, errors and progress output should go to stderr.  The git-pull.sh\nscript is pretty old and is probably just a bit sloppy about\nforgetting to redirect output from \"echo\".  Patches welcome.\n(See Documentation/SubmittingPatches for details.)\n\nHope that helps,\nJonathan\n"}]}