From 8f615493e6b6fd47bc4011c264cb7e6f01052d37 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 2 Aug 2006 11:28:16 -0400 Subject: git-push: allow -f as an alias for --force This was already documented in the options section of the manpage. This patch implements it, adds it to the usage message, and mentions it at the top of the manpage. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- builtin-push.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'builtin-push.c') diff --git a/builtin-push.c b/builtin-push.c index a824171066..c39dd1e092 100644 --- a/builtin-push.c +++ b/builtin-push.c @@ -8,7 +8,7 @@ #define MAX_URI (16) -static const char push_usage[] = "git push [--all] [--tags] [--force] [...]"; +static const char push_usage[] = "git push [--all] [--tags] [-f | --force] [...]"; static int all = 0, tags = 0, force = 0, thin = 1; static const char *execute = NULL; @@ -291,7 +291,7 @@ int cmd_push(int argc, const char **argv, const char *prefix) tags = 1; continue; } - if (!strcmp(arg, "--force")) { + if (!strcmp(arg, "--force") || !strcmp(arg, "-f")) { force = 1; continue; } -- cgit v1.2.3