{"thread":{"id":"7389","subject":"Re: [PATCH] Removed the printf(\"rm 'file'\") from git-rm.","startedAt":"2007-03-25T06:22:16Z","lastAt":"2007-03-26T22:56:40Z","messageCount":7,"participants":["Junio C Hamano","Anand Kumria","Tilman Sauerbeck","Johannes Schindelin","Eric Lesh","Martin Waitz"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"37912","messageId":"7vodmhc06f.fsf@assigned-by-dhcp.cox.net","threadId":"7389","inReplyTo":"11747590062554-git-send-email-tilman@code-monkey.de","subject":"Re: [PATCH] Removed the printf(\"rm 'file'\") from git-rm.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-25T06:22:16Z","receivedAt":"2007-03-25T06:22:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Tilman Sauerbeck <tilman@code-monkey.de> writes:\n\n> We used to print that, because you actually had to run the output\n> of git-rm to get rid of the files before Git 1.5. Now that git-rm\n> really removes the files, it's not needed anymore.\n\nEven though I admit I do not deeply care, as I never use 'git\nrm' myself, I do not necessarily agree with \"because\" part.\n\nI suspect people are by now accustomed to see the assuring\nfeedback from the command when used this way:\n\n\t$ git rm -r one\n        rm 'one/1'\n        rm 'one/2'\n        rm 'one/3'\n\nand even in non-recursive case, expect the similar output for\nconsistecy's sake.\n"},{"id":"37937","messageId":"pan.2007.03.25.16.39.10@progsoc.org","threadId":"7389","inReplyTo":"7vodmhc06f.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Removed the printf(\"rm 'file'\") from git-rm.","fromName":"Anand Kumria","fromEmail":"wildfire@progsoc.org","sentAt":"2007-03-25T16:38:59Z","receivedAt":"2007-03-25T16:38:59Z","isPatch":true,"sender":{"key":"wildfire@progsoc.org","avatar":null},"body":"On Sat, 24 Mar 2007 23:22:16 -0700, Junio C Hamano wrote:\n\n> Tilman Sauerbeck <tilman@code-monkey.de> writes:\n> \n>> We used to print that, because you actually had to run the output of\n>> git-rm to get rid of the files before Git 1.5. Now that git-rm really\n>> removes the files, it's not needed anymore.\n> \n> Even though I admit I do not deeply care, as I never use 'git rm'\n> myself, I do not necessarily agree with \"because\" part.\n> \n> I suspect people are by now accustomed to see the assuring feedback from\n> the command when used this way:\n> \n> \t$ git rm -r one\n>         rm 'one/1'\n>         rm 'one/2'\n>         rm 'one/3'\n\nHeh. I didn't even know there was a recursive option.  So I'm definitely \nnot 'accustomed' to any form of output.\n\nIf me being a data point helps at all.\n\nAnand\n"},{"id":"37960","messageId":"20070325210418.GA29221@code-monkey.de","threadId":"7389","inReplyTo":"7vodmhc06f.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Removed the printf(\"rm 'file'\") from git-rm.","fromName":"Tilman Sauerbeck","fromEmail":"tilman@code-monkey.de","sentAt":"2007-03-25T21:04:19Z","receivedAt":"2007-03-25T21:04:19Z","isPatch":true,"sender":{"key":"tilman@code-monkey.de","avatar":null},"body":"Junio C Hamano [2007-03-24 23:22]:\n> Tilman Sauerbeck <tilman@code-monkey.de> writes:\n> \n> > We used to print that, because you actually had to run the output\n> > of git-rm to get rid of the files before Git 1.5. Now that git-rm\n> > really removes the files, it's not needed anymore.\n> \n> Even though I admit I do not deeply care, as I never use 'git\n> rm' myself, I do not necessarily agree with \"because\" part.\n> \n> I suspect people are by now accustomed to see the assuring\n> feedback from the command when used this way:\n> [snip]\n\nToo bad, I find it rather annoying and irritating.\n\nRegards,\nTilman\n\n-- \nA: Because it messes up the order in which people normally read text.\nQ: Why is top-posting such a bad thing?\nA: Top-posting.\nQ: What is the most annoying thing on usenet and in e-mail?\n"},{"id":"37961","messageId":"Pine.LNX.4.63.0703252335280.4045@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"7389","inReplyTo":"20070325210418.GA29221@code-monkey.de","subject":"Re: [PATCH] Removed the printf(\"rm 'file'\") from git-rm.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-03-25T21:36:35Z","receivedAt":"2007-03-25T21:36:35Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 25 Mar 2007, Tilman Sauerbeck wrote:\n\n> Junio C Hamano [2007-03-24 23:22]:\n> > Tilman Sauerbeck <tilman@code-monkey.de> writes:\n> > \n> > > We used to print that, because you actually had to run the output\n> > > of git-rm to get rid of the files before Git 1.5. Now that git-rm\n> > > really removes the files, it's not needed anymore.\n> > \n> > Even though I admit I do not deeply care, as I never use 'git\n> > rm' myself, I do not necessarily agree with \"because\" part.\n> > \n> > I suspect people are by now accustomed to see the assuring\n> > feedback from the command when used this way:\n> > [snip]\n> \n> Too bad, I find it rather annoying and irritating.\n\nWhy not do the common thing, and add a \"--quiet\" option? You can even add \na config variable to enable it by default (for git-rm). It's not like \ngit-rm is performance critical...\n\n> A: Because it messes up the order in which people normally read text.\n> Q: Why is top-posting such a bad thing?\n> A: Top-posting.\n> Q: What is the most annoying thing on usenet and in e-mail?\n\nFunny!\n\nCiao,\nDscho\n"},{"id":"38027","messageId":"1174904904.5662.8.camel@localhost","threadId":"7389","inReplyTo":"Pine.LNX.4.63.0703252335280.4045@wbgn013.biozentrum.uni-wuerzburg.de","subject":"[PATCH] git-rm: add --quiet option to suppress \"rm 'file'\" messages","fromName":"Eric Lesh","fromEmail":"eclesh@ucla.edu","sentAt":"2007-03-26T10:28:24Z","receivedAt":"2007-03-26T10:28:24Z","isPatch":true,"sender":{"key":"eclesh@ucla.edu","avatar":null},"body":"Signed-off-by: Eric Lesh <eclesh@ucla.edu>\n\n---\n\nOn Sun, 2007-03-25 at 23:36 +0200, Johannes Schindelin wrote:\n> > Too bad, I find it rather annoying and irritating.\n> \n> Why not do the common thing, and add a \"--quiet\" option? You can even add \n> a config variable to enable it by default (for git-rm). It's not like \n> git-rm is performance critical...\n> \n\nIs something like this right?\n\n builtin-rm.c |    7 +++++--\n 1 files changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin-rm.c b/builtin-rm.c\nindex 00dbe39..d193fb0 100644\n--- a/builtin-rm.c\n+++ b/builtin-rm.c\n@@ -114,7 +114,7 @@ static struct lock_file lock_file;\n int cmd_rm(int argc, const char **argv, const char *prefix)\n {\n \tint i, newfd;\n-\tint show_only = 0, force = 0, index_only = 0, recursive = 0;\n+\tint show_only = 0, force = 0, index_only = 0, recursive = 0, quiet = 0;\n \tconst char **pathspec;\n \tchar *seen;\n \n@@ -142,6 +142,8 @@ int cmd_rm(int argc, const char **argv, const char *prefix)\n \t\t\tforce = 1;\n \t\telse if (!strcmp(arg, \"-r\"))\n \t\t\trecursive = 1;\n+\t\telse if (!strcmp(arg, \"-q\") || !strcmp(arg, \"--quiet\"))\n+\t\t\tquiet = 1;\n \t\telse\n \t\t\tusage(builtin_rm_usage);\n \t}\n@@ -197,7 +199,8 @@ int cmd_rm(int argc, const char **argv, const char *prefix)\n \t */\n \tfor (i = 0; i < list.nr; i++) {\n \t\tconst char *path = list.name[i];\n-\t\tprintf(\"rm '%s'\\n\", path);\n+\t\tif (!quiet)\n+\t\t\tprintf(\"rm '%s'\\n\", path);\n \n \t\tif (remove_file_from_cache(path))\n \t\t\tdie(\"git-rm: unable to remove %s\", path);\n-- \n1.5.1-rc1.GIT\n"},{"id":"38071","messageId":"20070326221347.GI22773@admingilde.org","threadId":"7389","inReplyTo":"Pine.LNX.4.63.0703252335280.4045@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] Removed the printf(\"rm 'file'\") from git-rm.","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2007-03-26T22:13:48Z","receivedAt":"2007-03-26T22:13:48Z","isPatch":true,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"hoi :)\n\nOn Sun, Mar 25, 2007 at 11:36:35PM +0200, Johannes Schindelin wrote:\n> Why not do the common thing, and add a \"--quiet\" option? You can even add \n> a config variable to enable it by default (for git-rm). It's not like \n> git-rm is performance critical...\n\nBut when we have to add --quiet to all sorts of commands that may be\nthe sign that they really are too chatty.\n\nIf I want a short output I don't want to type extra options.\nSo adding a --verbose for those that really depend on more output\nmakes more sense, IMHO.  (Even when I don't see any useful information\nin the git-rm output, to be honest.)\n\n-- \nMartin Waitz\n"},{"id":"38078","messageId":"7v8xdjvck7.fsf@assigned-by-dhcp.cox.net","threadId":"7389","inReplyTo":"1174904904.5662.8.camel@localhost","subject":"Re: [PATCH] git-rm: add --quiet option to suppress \"rm 'file'\" messages","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-26T22:56:40Z","receivedAt":"2007-03-26T22:56:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Lesh <eclesh@ucla.edu> writes:\n\n> Signed-off-by: Eric Lesh <eclesh@ucla.edu>\n>\n> ---\n>\n> On Sun, 2007-03-25 at 23:36 +0200, Johannes Schindelin wrote:\n>> > Too bad, I find it rather annoying and irritating.\n>> \n>> Why not do the common thing, and add a \"--quiet\" option? You can even add \n>> a config variable to enable it by default (for git-rm). It's not like \n>> git-rm is performance critical...\n>\n> Is something like this right?\n>\n>  builtin-rm.c |    7 +++++--\n>  1 files changed, 5 insertions(+), 2 deletions(-)\n>\n> diff --git a/builtin-rm.c b/builtin-rm.c\n> index 00dbe39..d193fb0 100644\n> --- a/builtin-rm.c\n> +++ b/builtin-rm.c\n> @@ -114,7 +114,7 @@ static struct lock_file lock_file;\n>  int cmd_rm(int argc, const char **argv, const char *prefix)\n>  {\n>  \tint i, newfd;\n> -\tint show_only = 0, force = 0, index_only = 0, recursive = 0;\n> +\tint show_only = 0, force = 0, index_only = 0, recursive = 0, quiet = 0;\n>  \tconst char **pathspec;\n>  \tchar *seen;\n>  \n> @@ -197,7 +199,8 @@ int cmd_rm(int argc, const char **argv, const char *prefix)\n>  \t */\n>  \tfor (i = 0; i < list.nr; i++) {\n>  \t\tconst char *path = list.name[i];\n> -\t\tprintf(\"rm '%s'\\n\", path);\n> +\t\tif (!quiet)\n> +\t\t\tprintf(\"rm '%s'\\n\", path);\n>  \n>  \t\tif (remove_file_from_cache(path))\n>  \t\t\tdie(\"git-rm: unable to remove %s\", path);\n\nI wonder how this would interact with show_only...\n"}]}