{"thread":{"id":"14301","subject":"git-clone --quiet broken?","startedAt":"2008-07-05T21:16:16Z","lastAt":"2008-07-07T01:40:50Z","messageCount":5,"participants":["Dave Jones","Junio C Hamano","Daniel Barkalow","Alex Riesen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"82305","messageId":"20080705211616.GA3874@codemonkey.org.uk","threadId":"14301","inReplyTo":null,"subject":"git-clone --quiet broken?","fromName":"Dave Jones","fromEmail":"davej@codemonkey.org.uk","sentAt":"2008-07-05T21:16:16Z","receivedAt":"2008-07-05T21:16:16Z","isPatch":false,"sender":{"key":"davej@codemonkey.org.uk","avatar":null},"body":"The server I run various git snapshots on recently got upgraded to git 1.5.6,\nand I started getting a lot more mail from cron than usual.\nIt seems that passing -q to git-clone at some point changed from 'silent'\nto 'slightly less noisy'. Only the difference is so slight that it may\nas well be nil..\n\nHere's a normal clone..\n\nInitialize git/.git\nInitialized empty Git repository in /home/davej/git-trees/git/.git/\nremote: Counting objects: 76925, done.\nremote: Compressing objects: 100% (25373/25373), done.\nremote: Total 76925 (delta 55699), reused 70336 (delta 50160)\nReceiving objects: 100% (76925/76925), 17.09 MiB | 1111 KiB/s, done.\nResolving deltas: 100% (55699/55699), done.\n\nAnd here's the 'quiet' clone..\n\nInitialize git/.git\nremote: Counting objects: 76925, done.\nremote: Compressing objects: 100% (25373/25373), done.\nremote: Total 76925 (delta 55699), reused 70336 (delta 50160)\nReceiving objects: 100% (76925/76925), 17.09 MiB | 1128 KiB/s, done.\nResolving deltas: 100% (55699/55699), done.\n\nSpot the difference :)\n\nIt looks even worse in mail from cron, where you get one line of text\nfor every % that git progresses through.\n\nI could run the clone with 2>/dev/null, but I'd really like to get\nmail when something breaks instead of it being totally silent.\n\nI'm assuming this was an unintentional side-effect of some other recent change?\n\n\tDave\n\n-- \nhttp://www.codemonkey.org.uk\n"},{"id":"82314","messageId":"7vmykvrfta.fsf@gitster.siamese.dyndns.org","threadId":"14301","inReplyTo":"20080705211616.GA3874@codemonkey.org.uk","subject":"Re: git-clone --quiet broken?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-06T00:56:17Z","receivedAt":"2008-07-06T00:56:17Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dave Jones <davej@codemonkey.org.uk> writes:\n\n> The server I run various git snapshots on recently got upgraded to git 1.5.6,\n> ...\n> I could run the clone with 2>/dev/null, but I'd really like to get\n> mail when something breaks instead of it being totally silent.\n>\n> I'm assuming this was an unintentional side-effect of some other recent change?\n\nYeah, I would assume so, too ;-)\n\nDaniel, is this enough?  From re-reading the scripted version of\ngit-clone, it appears that we *might* need to squelch no-progress if the\nstdout is not tty;  I do not offhand if you got that right when you\nrewrote this in C.\n\n transport.c |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/transport.c b/transport.c\nindex 3ff8519..b2f0d8a 100644\n--- a/transport.c\n+++ b/transport.c\n@@ -645,7 +645,8 @@ static int fetch_refs_via_pack(struct transport *transport,\n \targs.lock_pack = 1;\n \targs.use_thin_pack = data->thin;\n \targs.include_tag = data->followtags;\n-\targs.verbose = transport->verbose > 0;\n+\targs.verbose = (transport->verbose > 0);\n+\targs.quiet = (transport->verbose < 0);\n \targs.depth = data->depth;\n \n \tfor (i = 0; i < nr_heads; i++)\n"},{"id":"82319","messageId":"alpine.LNX.1.00.0807052102180.19665@iabervon.org","threadId":"14301","inReplyTo":"7vmykvrfta.fsf@gitster.siamese.dyndns.org","subject":"Re: git-clone --quiet broken?","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-07-06T01:22:18Z","receivedAt":"2008-07-06T01:22:18Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Sat, 5 Jul 2008, Junio C Hamano wrote:\n\n> Dave Jones <davej@codemonkey.org.uk> writes:\n> \n> > The server I run various git snapshots on recently got upgraded to git 1.5.6,\n> > ...\n> > I could run the clone with 2>/dev/null, but I'd really like to get\n> > mail when something breaks instead of it being totally silent.\n> >\n> > I'm assuming this was an unintentional side-effect of some other recent change?\n> \n> Yeah, I would assume so, too ;-)\n> \n> Daniel, is this enough?  From re-reading the scripted version of\n> git-clone, it appears that we *might* need to squelch no-progress if the\n> stdout is not tty;  I do not offhand if you got that right when you\n> rewrote this in C.\n\nThis is probably enough for what people actually care about (when stdout \nisn't a tty and isn't /dev/null, people are likely to ask for \"quiet\" \nanyway, because this command's output isn't interesting after the fact). \nBut no-progress is probably a good idea anyway.\n\nOh, and you're fixing the corresponding regressions in fetch, which nobody \nseems to have mentioned previously.\n\nAcked-by: Daniel Barkalow <barkalow@iabervon.org>\n\n>  transport.c |    3 ++-\n>  1 files changed, 2 insertions(+), 1 deletions(-)\n> \n> diff --git a/transport.c b/transport.c\n> index 3ff8519..b2f0d8a 100644\n> --- a/transport.c\n> +++ b/transport.c\n> @@ -645,7 +645,8 @@ static int fetch_refs_via_pack(struct transport *transport,\n>  \targs.lock_pack = 1;\n>  \targs.use_thin_pack = data->thin;\n>  \targs.include_tag = data->followtags;\n> -\targs.verbose = transport->verbose > 0;\n> +\targs.verbose = (transport->verbose > 0);\n> +\targs.quiet = (transport->verbose < 0);\n\nAnd:\n+\targs.no_progress = !isatty(1);\n\n>  \targs.depth = data->depth;\n>  \n>  \tfor (i = 0; i < nr_heads; i++)\n"},{"id":"82401","messageId":"20080706225649.GD17659@steel.home","threadId":"14301","inReplyTo":"7vmykvrfta.fsf@gitster.siamese.dyndns.org","subject":"Re: git-clone --quiet broken?","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2008-07-06T22:56:49Z","receivedAt":"2008-07-06T22:56:49Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Junio C Hamano, Sun, Jul 06, 2008 02:56:17 +0200:\n> Dave Jones <davej@codemonkey.org.uk> writes:\n> \n> > The server I run various git snapshots on recently got upgraded to git 1.5.6,\n> > ...\n> > I could run the clone with 2>/dev/null, but I'd really like to get\n> > mail when something breaks instead of it being totally silent.\n> >\n> > I'm assuming this was an unintentional side-effect of some other recent change?\n> \n> Yeah, I would assume so, too ;-)\n> \n> Daniel, is this enough?  From re-reading the scripted version of\n> git-clone, it appears that we *might* need to squelch no-progress if the\n> stdout is not tty;  I do not offhand if you got that right when you\n> rewrote this in C.\n\nWhile at it, could we please have the first \"Initialize\" message\nremoved?\n\n    Initialize git/.git\n    Initialized empty Git repository in /home/davej/git-trees/git/.git/\n\nThe default output looks redundant (that of init_db too, but the full\npath can be useful sometimes). Something like this, perhaps:\n\ndiff --git a/builtin-clone.c b/builtin-clone.c\nindex 643c7d4..4a0f1ab 100644\n--- a/builtin-clone.c\n+++ b/builtin-clone.c\n@@ -421,7 +421,6 @@ int cmd_clone(int argc, const char **argv, const char *prefix)\n \t\tdie(\"could not create leading directories of '%s'\", git_dir);\n \tset_git_dir(make_absolute_path(git_dir));\n \n-\tfprintf(stderr, \"Initialize %s\\n\", git_dir);\n \tinit_db(option_template, option_quiet ? INIT_DB_QUIET : 0);\n \n \t/*\n"},{"id":"82409","messageId":"alpine.LNX.1.00.0807062131100.19665@iabervon.org","threadId":"14301","inReplyTo":"20080706225649.GD17659@steel.home","subject":"Re: git-clone --quiet broken?","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-07-07T01:40:50Z","receivedAt":"2008-07-07T01:40:50Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Mon, 7 Jul 2008, Alex Riesen wrote:\n\n> While at it, could we please have the first \"Initialize\" message\n> removed?\n> \n>     Initialize git/.git\n>     Initialized empty Git repository in /home/davej/git-trees/git/.git/\n> \n> The default output looks redundant (that of init_db too, but the full\n> path can be useful sometimes). Something like this, perhaps:\n> \n> diff --git a/builtin-clone.c b/builtin-clone.c\n> index 643c7d4..4a0f1ab 100644\n> --- a/builtin-clone.c\n> +++ b/builtin-clone.c\n> @@ -421,7 +421,6 @@ int cmd_clone(int argc, const char **argv, const char *prefix)\n>  \t\tdie(\"could not create leading directories of '%s'\", git_dir);\n>  \tset_git_dir(make_absolute_path(git_dir));\n>  \n> -\tfprintf(stderr, \"Initialize %s\\n\", git_dir);\n>  \tinit_db(option_template, option_quiet ? INIT_DB_QUIET : 0);\n>  \n>  \t/*\n\nYeah, that's clearly left-over debugging, and I think that's the only one \nleft from this conversion, anyway.\n\nAcked-by: Daniel Barkalow <barkalow@iabervon.org>\n"}]}