]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-push: allow -f as an alias for --force
authorJeff King <peff@peff.net>
Wed, 2 Aug 2006 15:28:16 +0000 (11:28 -0400)
committerJunio C Hamano <junkio@cox.net>
Wed, 2 Aug 2006 18:30:42 +0000 (11:30 -0700)
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/git-push.txt
builtin-push.c

index 56afd64f42784457d73463ab9bea196264a3296b..d4ae99fa530a50fd354dc54004a7342afd693947 100644 (file)
@@ -8,7 +8,7 @@ git-push - Update remote refs along with associated objects
 
 SYNOPSIS
 --------
-'git-push' [--all] [--tags] [--force] <repository> <refspec>...
+'git-push' [--all] [--tags] [-f | --force] <repository> <refspec>...
 
 DESCRIPTION
 -----------
index a824171066b8b02b82ee45030efa7e6ef359b995..c39dd1e092def752d6935752362421abf35bfef1 100644 (file)
@@ -8,7 +8,7 @@
 
 #define MAX_URI (16)
 
-static const char push_usage[] = "git push [--all] [--tags] [--force] <repository> [<refspec>...]";
+static const char push_usage[] = "git push [--all] [--tags] [-f | --force] <repository> [<refspec>...]";
 
 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;
                }