{"thread":{"id":"4069","subject":"[PATCH/RFC (git-core)] squelch pack-object eye-candy on non-tty","startedAt":"2006-05-05T10:20:44Z","lastAt":"2006-05-05T11:19:41Z","messageCount":2,"participants":["Junio C Hamano","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"19555","messageId":"7vmzdwzsar.fsf@assigned-by-dhcp.cox.net","threadId":"4069","inReplyTo":null,"subject":"[PATCH/RFC (git-core)] squelch pack-object eye-candy on non-tty","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-05-05T10:20:44Z","receivedAt":"2006-05-05T10:20:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"One of my post-update scripts runs a git-fetch into a separate\nrepository and sends the results back to me (2>&1); I end up\ngetting this in the mail:\n\n    Generating pack...\n    Done counting 180 objects.\n    Result has 131 objects.\n    Deltifying 131 objects.\n       0% (0/131) done^M   1% (2/131) done^M...\n\nThis defaults not to do the progress report when not on a tty.\n\nYou could give --progress to force the progress report, but\nlet's not bother even documenting it nor mentioning it in the\nusage string.\n\n---\ndiff --git a/pack-objects.c b/pack-objects.c\nindex 6604338..53caed4 100644\n--- a/pack-objects.c\n+++ b/pack-objects.c\n@@ -1239,6 +1239,7 @@ int main(int argc, char **argv)\n \n \tsetup_git_directory();\n \n+\tprogress = isatty(2);\n \tfor (i = 1; i < argc; i++) {\n \t\tconst char *arg = argv[i];\n \n@@ -1269,6 +1270,10 @@ int main(int argc, char **argv)\n \t\t\t\t\tusage(pack_usage);\n \t\t\t\tcontinue;\n \t\t\t}\n+\t\t\tif (!strcmp(\"--progress\", arg)) {\n+\t\t\t\tprogress = 1;\n+\t\t\t\tcontinue;\n+\t\t\t}\n \t\t\tif (!strcmp(\"-q\", arg)) {\n \t\t\t\tprogress = 0;\n \t\t\t\tcontinue;\n"},{"id":"19556","messageId":"Pine.LNX.4.63.0605051319250.7784@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4069","inReplyTo":"7vmzdwzsar.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH/RFC (git-core)] squelch pack-object eye-candy on non-tty","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-05-05T11:19:41Z","receivedAt":"2006-05-05T11:19:41Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 5 May 2006, Junio C Hamano wrote:\n\n> This defaults not to do the progress report when not on a tty.\n\nMelikes,\nDscho\n"}]}