{"thread":{"id":"5087","subject":"git-push and -f option","startedAt":"2006-08-02T08:33:12Z","lastAt":"2006-08-02T15:28:16Z","messageCount":2,"participants":["Aneesh Kumar","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"24552","messageId":"cc723f590608020133o3c960cf0v1546c59319253dc0@mail.gmail.com","threadId":"5087","inReplyTo":null,"subject":"git-push and -f option","fromName":"Aneesh Kumar","fromEmail":"aneesh.kumar@gmail.com","sentAt":"2006-08-02T08:33:12Z","receivedAt":"2006-08-02T08:33:12Z","isPatch":false,"sender":{"key":"aneesh.kumar@gmail.com","avatar":"https://gravatar.com/avatar/0621fc0b2f14ead1e9024382f16053a808c148596da30c1b92572fa075621f68?d=mp&s=160"},"body":"The man page says -f is same as --force.  But the script doesn't seems\nto handle this.\n\n-aneesh\n"},{"id":"24562","messageId":"20060802152816.GA3923@coredump.intra.peff.net","threadId":"5087","inReplyTo":"cc723f590608020133o3c960cf0v1546c59319253dc0@mail.gmail.com","subject":"[PATCH] git-push: allow -f as an alias for --force","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2006-08-02T15:28:16Z","receivedAt":"2006-08-02T15:28:16Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"This was already documented in the options section of the manpage. This\npatch implements it, adds it to the usage message, and mentions it at the\ntop of the manpage.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nOn Wed, Aug 02, 2006 at 02:03:12PM +0530, Aneesh Kumar wrote:\n> The man page says -f is same as --force.  But the script doesn't seems\n> to handle this.\n\n Documentation/git-push.txt |    2 +-\n builtin-push.c             |    4 ++--\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex 56afd64..d4ae99f 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -8,7 +8,7 @@ git-push - Update remote refs along with\n \n SYNOPSIS\n --------\n-'git-push' [--all] [--tags] [--force] <repository> <refspec>...\n+'git-push' [--all] [--tags] [-f | --force] <repository> <refspec>...\n \n DESCRIPTION\n -----------\ndiff --git a/builtin-push.c b/builtin-push.c\nindex a824171..c39dd1e 100644\n--- a/builtin-push.c\n+++ b/builtin-push.c\n@@ -8,7 +8,7 @@ #include \"builtin.h\"\n \n #define MAX_URI (16)\n \n-static const char push_usage[] = \"git push [--all] [--tags] [--force] <repository> [<refspec>...]\";\n+static const char push_usage[] = \"git push [--all] [--tags] [-f | --force] <repository> [<refspec>...]\";\n \n static int all = 0, tags = 0, force = 0, thin = 1;\n static const char *execute = NULL;\n@@ -291,7 +291,7 @@ int cmd_push(int argc, const char **argv\n \t\t\ttags = 1;\n \t\t\tcontinue;\n \t\t}\n-\t\tif (!strcmp(arg, \"--force\")) {\n+\t\tif (!strcmp(arg, \"--force\") || !strcmp(arg, \"-f\")) {\n \t\t\tforce = 1;\n \t\t\tcontinue;\n \t\t}\n-- \n1.4.2.rc2.g822a-dirty\n"}]}