{"thread":{"id":"24652","subject":"[PATCH] prune: allow --dry-run for -n and --verbose for -v","startedAt":"2010-08-06T20:28:05Z","lastAt":"2010-08-07T08:25:59Z","messageCount":4,"participants":["René Scharfe","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"147342","messageId":"4C5C7055.3090100@lsrfire.ath.cx","threadId":"24652","inReplyTo":null,"subject":"[PATCH] prune: allow --dry-run for -n and --verbose for -v","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2010-08-06T20:28:05Z","receivedAt":"2010-08-06T20:28:05Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"For consistency with other git commands, let git prune accept the long\noptions --dry-run and --verbose for the respective short ones -n and -v.\n\nSigned-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n---\n Documentation/git-prune.txt |    2 ++\n builtin/prune.c             |    5 ++---\n 2 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-prune.txt b/Documentation/git-prune.txt\nindex 15cfb7a..4d673a5 100644\n--- a/Documentation/git-prune.txt\n+++ b/Documentation/git-prune.txt\n@@ -31,10 +31,12 @@ OPTIONS\n -------\n \n -n::\n+--dry-run::\n \tDo not remove anything; just report what it would\n \tremove.\n \n -v::\n+--verbose::\n \tReport all removed objects.\n \n \\--::\ndiff --git a/builtin/prune.c b/builtin/prune.c\nindex 81f915ec..99218ba 100644\n--- a/builtin/prune.c\n+++ b/builtin/prune.c\n@@ -125,10 +125,9 @@ int cmd_prune(int argc, const char **argv, const char *prefix)\n {\n \tstruct rev_info revs;\n \tconst struct option options[] = {\n-\t\tOPT_BOOLEAN('n', NULL, &show_only,\n+\t\tOPT_BOOLEAN('n', \"dry-run\", &show_only,\n \t\t\t    \"do not remove, show only\"),\n-\t\tOPT_BOOLEAN('v', NULL, &verbose,\n-\t\t\t\"report pruned objects\"),\n+\t\tOPT_BOOLEAN('v', \"verbose\", &verbose, \"report pruned objects\"),\n \t\tOPT_DATE(0, \"expire\", &expire,\n \t\t\t \"expire objects older than <time>\"),\n \t\tOPT_END()\n-- \n1.7.2\n"},{"id":"147343","messageId":"20100806210429.GA6495@burratino","threadId":"24652","inReplyTo":"4C5C7055.3090100@lsrfire.ath.cx","subject":"Re: [PATCH] prune: allow --dry-run for -n and --verbose for -v","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-08-06T21:04:29Z","receivedAt":"2010-08-06T21:04:29Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"René Scharfe wrote:\n\n> +++ b/builtin/prune.c\n> @@ -125,10 +125,9 @@ int cmd_prune(int argc, const char **argv, const char *prefix)\n>  {\n>  \tstruct rev_info revs;\n>  \tconst struct option options[] = {\n> -\t\tOPT_BOOLEAN('n', NULL, &show_only,\n> +\t\tOPT_BOOLEAN('n', \"dry-run\", &show_only,\n\nFor the curious: avoiding OPT__DRY_RUN allows us to give a better\ndescription:\n\n>  \t\t\t    \"do not remove, show only\"),\n\nwhich makes sense to me.  Thanks.\n"},{"id":"147353","messageId":"4C5C8193.1040608@lsrfire.ath.cx","threadId":"24652","inReplyTo":"20100806210429.GA6495@burratino","subject":"Re: [PATCH] prune: allow --dry-run for -n and --verbose for -v","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2010-08-06T21:41:39Z","receivedAt":"2010-08-06T21:41:39Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Am 06.08.2010 23:04, schrieb Jonathan Nieder:\n> René Scharfe wrote:\n>\n>> +++ b/builtin/prune.c\n>> @@ -125,10 +125,9 @@ int cmd_prune(int argc, const char **argv, const char *prefix)\n>>   {\n>>   \tstruct rev_info revs;\n>>   \tconst struct option options[] = {\n>> -\t\tOPT_BOOLEAN('n', NULL, &show_only,\n>> +\t\tOPT_BOOLEAN('n', \"dry-run\", &show_only,\n>\n> For the curious: avoiding OPT__DRY_RUN allows us to give a better\n> description:\n>\n>>   \t\t\t\"do not remove, show only\"),\n>\n> which makes sense to me.  Thanks.\n\nIndeed.\n\nAdding a helptext parameter to OPT__DRY_RUN à la OPT__COLOR would make \nit usable here as well as in commit.c and fetch.c.  Similar changes \ncould help OPT__VERBOSE and OPT__QUIET.  Their standard helptexts don't \nadd a lot of information..\n\nRené\n"},{"id":"147378","messageId":"4C5D1897.2070109@lsrfire.ath.cx","threadId":"24652","inReplyTo":"4C5C8193.1040608@lsrfire.ath.cx","subject":"Re: [PATCH] prune: allow --dry-run for -n and --verbose for -v","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2010-08-07T08:25:59Z","receivedAt":"2010-08-07T08:25:59Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Am 06.08.2010 23:41, schrieb René Scharfe:\n> Adding a helptext parameter to OPT__DRY_RUN à la OPT__COLOR would make\n> it usable here as well as in commit.c and fetch.c.\n\nActually it doesn't, because the short option -n is used for other\npurposes there.  But I still think it's worth doing because the\ndescription can then be made more meaningful instead while now it's just\nrepeating the long option.\n\nRené\n"}]}