{"thread":{"id":"34384","subject":"[PATCH] builtin/push.c: use OPT_BOOL, not OPT_BOOLEAN","startedAt":"2013-07-08T21:59:46Z","lastAt":"2013-07-09T00:29:34Z","messageCount":2,"participants":["Junio C Hamano","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"222866","messageId":"7vsizoyap9.fsf@alter.siamese.dyndns.org","threadId":"34384","inReplyTo":null,"subject":"[PATCH] builtin/push.c: use OPT_BOOL, not OPT_BOOLEAN","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-07-08T21:59:46Z","receivedAt":"2013-07-08T21:59:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The command line parser of \"git push\" for \"--tags\", \"--delete\", and\n\"--thin\" options still used outdated OPT_BOOLEAN.  Because these\noptions do not give escalating levels when given multiple times,\nthey should use OPT_BOOL.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/push.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin/push.c b/builtin/push.c\nindex 2d84d10..342d792 100644\n--- a/builtin/push.c\n+++ b/builtin/push.c\n@@ -427,15 +427,15 @@ int cmd_push(int argc, const char **argv, const char *prefix)\n \t\tOPT_BIT( 0 , \"all\", &flags, N_(\"push all refs\"), TRANSPORT_PUSH_ALL),\n \t\tOPT_BIT( 0 , \"mirror\", &flags, N_(\"mirror all refs\"),\n \t\t\t    (TRANSPORT_PUSH_MIRROR|TRANSPORT_PUSH_FORCE)),\n-\t\tOPT_BOOLEAN( 0, \"delete\", &deleterefs, N_(\"delete refs\")),\n-\t\tOPT_BOOLEAN( 0 , \"tags\", &tags, N_(\"push tags (can't be used with --all or --mirror)\")),\n+\t\tOPT_BOOL( 0, \"delete\", &deleterefs, N_(\"delete refs\")),\n+\t\tOPT_BOOL( 0 , \"tags\", &tags, N_(\"push tags (can't be used with --all or --mirror)\")),\n \t\tOPT_BIT('n' , \"dry-run\", &flags, N_(\"dry run\"), TRANSPORT_PUSH_DRY_RUN),\n \t\tOPT_BIT( 0,  \"porcelain\", &flags, N_(\"machine-readable output\"), TRANSPORT_PUSH_PORCELAIN),\n \t\tOPT_BIT('f', \"force\", &flags, N_(\"force updates\"), TRANSPORT_PUSH_FORCE),\n \t\t{ OPTION_CALLBACK, 0, \"recurse-submodules\", &flags, N_(\"check\"),\n \t\t\tN_(\"control recursive pushing of submodules\"),\n \t\t\tPARSE_OPT_OPTARG, option_parse_recurse_submodules },\n-\t\tOPT_BOOLEAN( 0 , \"thin\", &thin, N_(\"use thin pack\")),\n+\t\tOPT_BOOL( 0 , \"thin\", &thin, N_(\"use thin pack\")),\n \t\tOPT_STRING( 0 , \"receive-pack\", &receivepack, \"receive-pack\", N_(\"receive pack program\")),\n \t\tOPT_STRING( 0 , \"exec\", &receivepack, \"receive-pack\", N_(\"receive pack program\")),\n \t\tOPT_BIT('u', \"set-upstream\", &flags, N_(\"set upstream for git pull/status\"),\n-- \n1.8.3.2-876-ge3d3f5e\n"},{"id":"222870","messageId":"20130709002934.GX408@google.com","threadId":"34384","inReplyTo":"7vsizoyap9.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] builtin/push.c: use OPT_BOOL, not OPT_BOOLEAN","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-07-09T00:29:34Z","receivedAt":"2013-07-09T00:29:34Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Junio C Hamano wrote:\n\n> The command line parser of \"git push\" for \"--tags\", \"--delete\", and\n> \"--thin\" options still used outdated OPT_BOOLEAN.  Because these\n> options do not give escalating levels when given multiple times,\n> they should use OPT_BOOL.\n\nThanks.  Looks obviously correct, so\n\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n"}]}