{"thread":{"id":"22520","subject":"[PATCH] git-clean: fix the description of the default behavior","startedAt":"2010-02-04T16:01:16Z","lastAt":"2010-02-05T09:06:23Z","messageCount":4,"participants":["Michael J Gruber","Junio C Hamano","Jay Soffian"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"133604","messageId":"dafb1423c81bc2207d06cf2a97205bcbd9a4968e.1265299086.git.git@drmicha.warpmail.net","threadId":"22520","inReplyTo":null,"subject":"[PATCH] git-clean: fix the description of the default behavior","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-02-04T16:01:16Z","receivedAt":"2010-02-04T16:01:16Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Currently, when called without -n and -f, git clean issues\n\nfatal: clean.requireForce not set and -n or -f not given; refusing to clean\n\nwhich leaves the user wondering why force is required when requireForce\nis not set. Looking up in git-clean(1) does not help because its\ndescription is wrong.\n\nChange it so that git clean issues\n\nfatal: clean.requireForce defaults to true and -n or -f not given; refusing to clean\n\nin this situation (and \"...set to true...\" when it is set) which makes\nit clearer that an unset config means true here, and adjust the\ndocumentation.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\nI'd actually suggest changing \"and -n or -f not given\" to \"and neither -n nor -f given\"\nin addition to the above, but the above is a real fix, whereas the latter is a style\nissue, and we're close to release.\n\nIn fact, having a variable where unset means true is rather unfortunate,\nbut I don't expect that to be changing.\n\n Documentation/git-clean.txt |    4 ++--\n builtin-clean.c             |    4 ++--\n 2 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt\nindex 335c885..a81cb6c 100644\n--- a/Documentation/git-clean.txt\n+++ b/Documentation/git-clean.txt\n@@ -33,8 +33,8 @@ OPTIONS\n \n -f::\n --force::\n-\tIf the git configuration specifies clean.requireForce as true,\n-\t'git clean' will refuse to run unless given -f or -n.\n+\tIf the git configuration variable clean.requireForce is not set\n+\tto false, 'git clean' will refuse to run unless given -f or -n.\n \n -n::\n --dry-run::\ndiff --git a/builtin-clean.c b/builtin-clean.c\nindex 3a70fa8..6ad5892 100644\n--- a/builtin-clean.c\n+++ b/builtin-clean.c\n@@ -67,8 +67,8 @@ int cmd_clean(int argc, const char **argv, const char *prefix)\n \t\tdie(\"-x and -X cannot be used together\");\n \n \tif (!show_only && !force)\n-\t\tdie(\"clean.requireForce%s set and -n or -f not given; \"\n-\t\t    \"refusing to clean\", config_set ? \"\" : \" not\");\n+\t\tdie(\"clean.requireForce %s to true and -n or -f not given; \"\n+\t\t    \"refusing to clean\", config_set ? \"set\" : \"defaults\");\n \n \tif (force > 1)\n \t\trm_flags = 0;\n-- \n1.7.0.rc1.199.g9253ab\n"},{"id":"133618","messageId":"7veil0gbw8.fsf@alter.siamese.dyndns.org","threadId":"22520","inReplyTo":"dafb1423c81bc2207d06cf2a97205bcbd9a4968e.1265299086.git.git@drmicha.warpmail.net","subject":"Re: [PATCH] git-clean: fix the description of the default behavior","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-02-04T17:15:51Z","receivedAt":"2010-02-04T17:15:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"looks sane; thanks.\n"},{"id":"133641","messageId":"76718491002041316x31f02e0bq5c47a2a96aadb6f4@mail.gmail.com","threadId":"22520","inReplyTo":"dafb1423c81bc2207d06cf2a97205bcbd9a4968e.1265299086.git.git@drmicha.warpmail.net","subject":"Re: [PATCH] git-clean: fix the description of the default behavior","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2010-02-04T21:16:27Z","receivedAt":"2010-02-04T21:16:27Z","isPatch":true,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Thu, Feb 4, 2010 at 11:01 AM, Michael J Gruber\n<git@drmicha.warpmail.net> wrote:\n> fatal: clean.requireForce defaults to true and -n or -f not given; refusing to clean\n\nBike shed:\n\nfatal: clean.requireForce defaults to true and neither -n nor -f\ngiven; refusing to clean\n\nj.\n"},{"id":"133672","messageId":"4B6BDF8F.1080902@drmicha.warpmail.net","threadId":"22520","inReplyTo":"76718491002041316x31f02e0bq5c47a2a96aadb6f4@mail.gmail.com","subject":"Re: [PATCH] git-clean: fix the description of the default behavior","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-02-05T09:06:23Z","receivedAt":"2010-02-05T09:06:23Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Jay Soffian venit, vidit, dixit 04.02.2010 22:16:\n> On Thu, Feb 4, 2010 at 11:01 AM, Michael J Gruber\n> <git@drmicha.warpmail.net> wrote:\n>> fatal: clean.requireForce defaults to true and -n or -f not given; refusing to clean\n> \n> Bike shed:\n> \n> fatal: clean.requireForce defaults to true and neither -n nor -f\n> given; refusing to clean\n> \n> j.\n\nAssuming you're not git-am, you do read between \"---\" and diff, don't\nyou? ;)\n\nMichael\n"}]}