{"thread":{"id":"21953","subject":"git gc logs to standard error","startedAt":"2009-12-14T14:45:15Z","lastAt":"2009-12-14T16:46:22Z","messageCount":8,"participants":["Richard Rossel","Johan Herland","Jacob Helwig"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"129880","messageId":"4B264F7B.8070504@inf.utfsm.cl","threadId":"21953","inReplyTo":null,"subject":"git gc logs to standard error","fromName":"Richard Rossel","fromEmail":"rrossel@inf.utfsm.cl","sentAt":"2009-12-14T14:45:15Z","receivedAt":"2009-12-14T14:45:15Z","isPatch":false,"sender":{"key":"rrossel@inf.utfsm.cl","avatar":null},"body":"Hi,\nI have a question related to the output of git gc logs. Let me explain,\n\nI have a git commands in crontab (for redmine purpose) doing this stuff:\n' git fetch -q origin && git reset -q --soft refs/remotes/origin/master '\nfor each project.\n\nThe problem is that am getting mail from crontab each time that somebody\ndo a push to the central server. Its really annoying. I try to avoid \nthose messages\nredirecting the standard output with no results, then adding a quiet \noption  and no results.\nThis is the kind of mails that am receiving:\n\n\nremote: Counting objects: 6, done.\nremote: Compressing objects:  25% (1/4)\nremote: Compressing objects:  50% (2/4)\nremote: Compressing objects:  75% (3/4        )remote:\nremote: Compressing objects: 100% (4/4)\nremote: Compressing objects: 100% (4/4), done.\nremote: Total 4 (delta 2), reused 0 (delta 0)\n From git@boss:drivings\n   0f35f06..5bc8866  master     -> origin/master\n\n\nThen I realized that the message is git gc logs looks like, so I did:\n\n$ git gc\nCounting objects: 51, done.\nDelta compression using up to 2 threads.\nCompressing objects: 100% (35/35), done.\nWriting objects: 100% (51/51), done.\nTotal 51 (delta 12), reused 51 (delta 12)\n\nThe message are pretty similar, so I sent the logs to dev/null but:\n\n$ git gc >/dev/null\nCounting objects: 51, done.\nDelta compression using up to 2 threads.\nCompressing objects: 100% (35/35), done.\nWriting objects: 100% (51/51), done.\nTotal 51 (delta 12), reused 51 (delta 12)\n\nI realized that the message are sent to standard error,\nso the question is why is the reason to do that?\n\nThe quick solution to my problem of annoying mails is send the output \nerror to /dev/null\nbut what happens when an error really occur, there will be no message to \nalert me.\n\nthanks for your help\n\nsaludos.-\n\n--\nRichard Rossel\nSoftware Engineer at Airsage Inc.\nValparaiso - Chile\n"},{"id":"129883","messageId":"200912141655.01268.johan@herland.net","threadId":"21953","inReplyTo":"4B264F7B.8070504@inf.utfsm.cl","subject":"Re: git gc logs to standard error","fromName":"Johan Herland","fromEmail":"johan@herland.net","sentAt":"2009-12-14T15:55:01Z","receivedAt":"2009-12-14T15:55:01Z","isPatch":false,"sender":{"key":"johan@herland.net","avatar":"https://avatars.githubusercontent.com/u/547031?v=4"},"body":"On Monday 14 December 2009, Richard Rossel wrote:\n> Hi,\n> I have a question related to the output of git gc logs. Let me\n> explain,\n>\n> [...]\n>\n> I realized that the message are sent to standard error,\n> so the question is why is the reason to do that?\n>\n> The quick solution to my problem of annoying mails is send the output\n> error to /dev/null\n> but what happens when an error really occur, there will be no message\n> to alert me.\n\nTry the --quiet parameter to \"git gc\" (and other git commands).\n\n\n...Johan\n\n-- \nJohan Herland, <johan@herland.net>\nwww.herland.net\n"},{"id":"129884","messageId":"8c9a060912140804t409030b4g168014bd80a0b88c@mail.gmail.com","threadId":"21953","inReplyTo":"200912141655.01268.johan@herland.net","subject":"Re: git gc logs to standard error","fromName":"Jacob Helwig","fromEmail":"jacob.helwig@gmail.com","sentAt":"2009-12-14T16:04:08Z","receivedAt":"2009-12-14T16:04:08Z","isPatch":false,"sender":{"key":"jacob.helwig@gmail.com","avatar":"https://avatars.githubusercontent.com/u/14557?v=4"},"body":"On Mon, Dec 14, 2009 at 07:55, Johan Herland <johan@herland.net> wrote:\n> On Monday 14 December 2009, Richard Rossel wrote:\n>> Hi,\n>> I have a question related to the output of git gc logs. Let me\n>> explain,\n>>\n>> [...]\n>>\n>> I realized that the message are sent to standard error,\n>> so the question is why is the reason to do that?\n>>\n>> The quick solution to my problem of annoying mails is send the output\n>> error to /dev/null\n>> but what happens when an error really occur, there will be no message\n>> to alert me.\n>\n> Try the --quiet parameter to \"git gc\" (and other git commands).\n>\n>\n> ...Johan\n>\n> --\n> Johan Herland, <johan@herland.net>\n> www.herland.net\n\nI think the real problem that Richard is experiencing is that git\nfetch isn't respecting the --quiet option.  The output being similar\nto git gc, and also being on STDERR seems to be a red-herring.\n\nRichard,\n\nWhat version of git are you using?\n\nAlso, what is the output from 'git fetch --q; echo $?' if you just run\nthat in your repo?  If the last line you see is '0', then that should\nbe the only output you see.\n\n-Jacob\n"},{"id":"129885","messageId":"4B266371.9040106@inf.utfsm.cl","threadId":"21953","inReplyTo":"200912141655.01268.johan@herland.net","subject":"Re: git gc logs to standard error","fromName":"Richard Rossel","fromEmail":"rrossel@inf.utfsm.cl","sentAt":"2009-12-14T16:10:25Z","receivedAt":"2009-12-14T16:10:25Z","isPatch":false,"sender":{"key":"rrossel@inf.utfsm.cl","avatar":null},"body":">\n> On Monday 14 December 2009, Richard Rossel wrote:\n>    \n>> Hi,\n>> I have a question related to the output of git gc logs. Let me\n>> explain,\n>>\n>> [...]\n>>\n>> I realized that the message are sent to standard error,\n>> so the question is why is the reason to do that?\n>>\n>> The quick solution to my problem of annoying mails is send the output\n>> error to /dev/null\n>> but what happens when an error really occur, there will be no message\n>> to alert me.\n>>      \n> Try the --quiet parameter to \"git gc\" (and other git commands).\n>\n>\n> ...Johan\n>\n>    \n\n\nYes,  the quiet option works when I do 'git gc', but in the cron file \nthere is no\ngit-gc command, only fetch and reset. I suppose that  those commands \ncalls (internally)\nto git-gc.\nAlso I try with -q option in fetch and reset but without results, the \nonly thing that\nworks was with 2>/dev/null, but as I mention before, is not a good idea \nbecause\nI will miss the real errors messages.\n\nThe real question here is why git-gc send those logs to the standard \nerror instead of\nstandard output?\n\n--\nRichard Rossel\nAirsage Inc.\nValparaiso - Chile\n"},{"id":"129887","messageId":"4B26669A.8020806@inf.utfsm.cl","threadId":"21953","inReplyTo":"8c9a060912140804t409030b4g168014bd80a0b88c@mail.gmail.com","subject":"Re: git gc logs to standard error","fromName":"Richard Rossel","fromEmail":"rrossel@inf.utfsm.cl","sentAt":"2009-12-14T16:23:54Z","receivedAt":"2009-12-14T16:23:54Z","isPatch":false,"sender":{"key":"rrossel@inf.utfsm.cl","avatar":null},"body":">\n> On Mon, Dec 14, 2009 at 07:55, Johan Herland<johan@herland.net>  wrote:\n>    \n>> On Monday 14 December 2009, Richard Rossel wrote:\n>>      \n>>> Hi,\n>>> I have a question related to the output of git gc logs. Let me\n>>> explain,\n>>>\n>>> [...]\n>>>\n>>> I realized that the message are sent to standard error,\n>>> so the question is why is the reason to do that?\n>>>\n>>> The quick solution to my problem of annoying mails is send the output\n>>> error to /dev/null\n>>> but what happens when an error really occur, there will be no message\n>>> to alert me.\n>>>        \n>> Try the --quiet parameter to \"git gc\" (and other git commands).\n>>\n>>\n>> ...Johan\n>>\n>> --\n>> Johan Herland,<johan@herland.net>\n>> www.herland.net\n>>      \n> I think the real problem that Richard is experiencing is that git\n> fetch isn't respecting the --quiet option.  The output being similar\n> to git gc, and also being on STDERR seems to be a red-herring.\n>\n> Richard,\n>\n> What version of git are you using?\n>\n> Also, what is the output from 'git fetch --q; echo $?' if you just run\n> that in your repo?  If the last line you see is '0', then that should\n> be the only output you see.\n>\n> -Jacob\n>    \n\n$ git --version\ngit version 1.5.4.3\n\nAnd when there is no change in the repo\n\n$ git fetch --q; echo $?\n0\n\nno messages and no error , but when there is a change to syncronize\n\n$ git fetch --q; echo $?\nremote: Counting objects: 7, done.\nremote: Compressing objects: 100% (5/5), done.\nremote: Total 5 (delta remote: 2), reused 0 (delta 0)\nUnpacking objects: 100% (5/5), done.\n From git@boss:sandbox\n    3e4df7f..b92d27c  master     -> origin/master\n0\n\nhere come the messages but the return value is still 0\n\nI will try to update git to v1.6.5.6 and see what happend\n\n--\nRichard Rossel\nAirsage Inc.\nValparaiso - Chile\n"},{"id":"129888","messageId":"8c9a060912140828p3b05972lf9abc82c7b0f9bc1@mail.gmail.com","threadId":"21953","inReplyTo":"4B26669A.8020806@inf.utfsm.cl","subject":"Re: git gc logs to standard error","fromName":"Jacob Helwig","fromEmail":"jacob.helwig@gmail.com","sentAt":"2009-12-14T16:28:27Z","receivedAt":"2009-12-14T16:28:27Z","isPatch":false,"sender":{"key":"jacob.helwig@gmail.com","avatar":"https://avatars.githubusercontent.com/u/14557?v=4"},"body":"On Mon, Dec 14, 2009 at 08:23, Richard Rossel <rrossel@inf.utfsm.cl> wrote:\n>\n> $ git --version\n> git version 1.5.4.3\n>\n> And when there is no change in the repo\n>\n> $ git fetch --q; echo $?\n> 0\n>\n> no messages and no error , but when there is a change to syncronize\n>\n> $ git fetch --q; echo $?\n> remote: Counting objects: 7, done.\n> remote: Compressing objects: 100% (5/5), done.\n> remote: Total 5 (delta remote: 2), reused 0 (delta 0)\n> Unpacking objects: 100% (5/5), done.\n> From git@boss:sandbox\n>   3e4df7f..b92d27c  master     -> origin/master\n> 0\n>\n\nDon't use a double dash, if you're using the short option.\n\ngit fetch -q\nOR\ngit fetch --quiet\n\ngit fetch --q <--- This is not what you think it is.\n\n-Jacob\n"},{"id":"129889","messageId":"4B2669CD.9020505@inf.utfsm.cl","threadId":"21953","inReplyTo":"8c9a060912140828p3b05972lf9abc82c7b0f9bc1@mail.gmail.com","subject":"Re: git gc logs to standard error","fromName":"Richard Rossel","fromEmail":"rrossel@inf.utfsm.cl","sentAt":"2009-12-14T16:37:33Z","receivedAt":"2009-12-14T16:37:33Z","isPatch":false,"sender":{"key":"rrossel@inf.utfsm.cl","avatar":null},"body":">\n> On Mon, Dec 14, 2009 at 08:23, Richard Rossel<rrossel@inf.utfsm.cl>  wrote:\n>    \n>> $ git --version\n>> git version 1.5.4.3\n>>\n>> And when there is no change in the repo\n>>\n>> $ git fetch --q; echo $?\n>> 0\n>>\n>> no messages and no error , but when there is a change to syncronize\n>>\n>> $ git fetch --q; echo $?\n>> remote: Counting objects: 7, done.\n>> remote: Compressing objects: 100% (5/5), done.\n>> remote: Total 5 (delta remote: 2), reused 0 (delta 0)\n>> Unpacking objects: 100% (5/5), done.\n>>  From git@boss:sandbox\n>>    3e4df7f..b92d27c  master     ->  origin/master\n>> 0\n>>\n>>      \n> Don't use a double dash, if you're using the short option.\n>\n> git fetch -q\n> OR\n> git fetch --quiet\n>\n> git fetch --q<--- This is not what you think it is.\n>\n> -Jacob\n>\n>    \ndoh, sorry, my mistake\n\n$ git fetch -q; echo $?\nremote: Counting objects: 5, done.\nremote: Compressing objects: 100% (2/2), done.\nremote: Total 3 (delta 1), reused 0 (delta 0)\nUnpacking objects: 100% (3/3), done.\n From git@boss:sandbox\n    b92d27c..17b8b5d  master     -> origin/master\n0\n\nThese is the output when there is a change to be syncronized\n\nBTW,  in crontab the commands are using -q option, the mistake was made \njust here :)\n\n\n-- \nRichard Rossel\nSoftare Engineer at Airsage Inc.\nValparaiso - Chile\n"},{"id":"129890","messageId":"8c9a060912140846r36897c7cl738036963b0d5693@mail.gmail.com","threadId":"21953","inReplyTo":"4B2669CD.9020505@inf.utfsm.cl","subject":"Re: git gc logs to standard error","fromName":"Jacob Helwig","fromEmail":"jacob.helwig@gmail.com","sentAt":"2009-12-14T16:46:22Z","receivedAt":"2009-12-14T16:46:22Z","isPatch":false,"sender":{"key":"jacob.helwig@gmail.com","avatar":"https://avatars.githubusercontent.com/u/14557?v=4"},"body":"On Mon, Dec 14, 2009 at 08:37, Richard Rossel <rrossel@inf.utfsm.cl> wrote:\n>>\n>> On Mon, Dec 14, 2009 at 08:23, Richard Rossel<rrossel@inf.utfsm.cl>\n>>  wrote:\n>>\n>>>\n>>> $ git --version\n>>> git version 1.5.4.3\n>>>\n>>> And when there is no change in the repo\n>>>\n>>> $ git fetch --q; echo $?\n>>> 0\n>>>\n>>> no messages and no error , but when there is a change to syncronize\n>>>\n>>> $ git fetch --q; echo $?\n>>> remote: Counting objects: 7, done.\n>>> remote: Compressing objects: 100% (5/5), done.\n>>> remote: Total 5 (delta remote: 2), reused 0 (delta 0)\n>>> Unpacking objects: 100% (5/5), done.\n>>>  From git@boss:sandbox\n>>>   3e4df7f..b92d27c  master     ->  origin/master\n>>> 0\n>>>\n>>>\n>>\n>> Don't use a double dash, if you're using the short option.\n>>\n>> git fetch -q\n>> OR\n>> git fetch --quiet\n>>\n>> git fetch --q<--- This is not what you think it is.\n>>\n>> -Jacob\n>>\n>>\n>\n> doh, sorry, my mistake\n>\n> $ git fetch -q; echo $?\n> remote: Counting objects: 5, done.\n> remote: Compressing objects: 100% (2/2), done.\n> remote: Total 3 (delta 1), reused 0 (delta 0)\n> Unpacking objects: 100% (3/3), done.\n> From git@boss:sandbox\n>   b92d27c..17b8b5d  master     -> origin/master\n> 0\n>\n> These is the output when there is a change to be syncronized\n>\n> BTW,  in crontab the commands are using -q option, the mistake was made just\n> here :)\n>\n\nIt looks like you want to upgrade to at least 1.6.0.3 (I know that\nwith 1.6.5.5 I get no output with 'git fetch -q', whether or not there\nare pending updates).  There's a fix (fe8aa148) for the issue[1] it\nlooks like you're having.\n\n[1] http://marc.info/?l=git&m=121529226023180&w=2\n"}]}