aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2006-08-02 11:28:16 -0400
committerJunio C Hamano <junkio@cox.net>2006-08-02 11:30:42 -0700
commit8f615493e6b6fd47bc4011c264cb7e6f01052d37 (patch)
tree54d388009f2b78fafb8b23aa580eba7f3ab248fb
parent822a7d507151e1d6310f52d5b05234d65db11a88 (diff)
downloadgit-8f615493e6b6fd47bc4011c264cb7e6f01052d37.tar.gz
git-8f615493e6b6fd47bc4011c264cb7e6f01052d37.tar.xz
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 <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--Documentation/git-push.txt2
-rw-r--r--builtin-push.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 56afd64f4..d4ae99fa5 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -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
-----------
diff --git a/builtin-push.c b/builtin-push.c
index a82417106..c39dd1e09 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] <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;
}