From: Jeff King <peff@peff.net>
To: Junio C Hamano <junkio@cox.net>
Cc: Git Mailing List <git@vger.kernel.org>,
Aneesh Kumar <aneesh.kumar@gmail.com>
Subject: [PATCH] git-push: allow -f as an alias for --force
Date: Wed, 2 Aug 2006 11:28:16 -0400 [thread overview]
Message-ID: <20060802152816.GA3923@coredump.intra.peff.net> (raw)
In-Reply-To: <cc723f590608020133o3c960cf0v1546c59319253dc0@mail.gmail.com>
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>
---
On Wed, Aug 02, 2006 at 02:03:12PM +0530, Aneesh Kumar wrote:
> The man page says -f is same as --force. But the script doesn't seems
> to handle this.
Documentation/git-push.txt | 2 +-
builtin-push.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 56afd64..d4ae99f 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -8,7 +8,7 @@ git-push - Update remote refs along with
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 a824171..c39dd1e 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -8,7 +8,7 @@ #include "builtin.h"
#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
tags = 1;
continue;
}
- if (!strcmp(arg, "--force")) {
+ if (!strcmp(arg, "--force") || !strcmp(arg, "-f")) {
force = 1;
continue;
}
--
1.4.2.rc2.g822a-dirty
prev parent reply other threads:[~2006-08-02 15:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-02 8:33 git-push and -f option Aneesh Kumar
2006-08-02 15:28 ` Jeff King [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060802152816.GA3923@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=aneesh.kumar@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox