summaryrefslogtreecommitdiff
path: root/builtin-push.c
diff options
context:
space:
mode:
authorNelson Elhage <nelhage@MIT.EDU>2009-09-13 12:56:45 -0400
committerJunio C Hamano <gitster@pobox.com>2009-09-13 11:29:18 -0700
commit9f67fee2f0190e0b10e73862cbb88a3f7216f619 (patch)
tree4ee21bd4d021e3fa970bafcb29e3670fff3a363a /builtin-push.c
parent12efe45a3363ebecd8954d04caadb23eba2e5020 (diff)
downloadgit-9f67fee2f0190e0b10e73862cbb88a3f7216f619.tar.gz
git-push: Accept -n as a synonym for --dry-run.
git-push is not currently using -n for anything else, and it seems unlikely we will want to use it to mean anything else in the future, so add it as an alias for convenience. Signed-off-by: Nelson Elhage <nelhage@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-push.c')
-rw-r--r--builtin-push.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-push.c b/builtin-push.c
index 6eda372a55..3cb1ee46d1 100644
--- a/builtin-push.c
+++ b/builtin-push.c
@@ -10,7 +10,7 @@
#include "parse-options.h"
static const char * const push_usage[] = {
- "git push [--all | --mirror] [--dry-run] [--porcelain] [--tags] [--receive-pack=<git-receive-pack>] [--repo=<repository>] [-f | --force] [-v] [<repository> <refspec>...]",
+ "git push [--all | --mirror] [-n | --dry-run] [--porcelain] [--tags] [--receive-pack=<git-receive-pack>] [--repo=<repository>] [-f | --force] [-v] [<repository> <refspec>...]",
NULL,
};
@@ -182,7 +182,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
OPT_BIT( 0 , "mirror", &flags, "mirror all refs",
(TRANSPORT_PUSH_MIRROR|TRANSPORT_PUSH_FORCE)),
OPT_BOOLEAN( 0 , "tags", &tags, "push tags"),
- OPT_BIT( 0 , "dry-run", &flags, "dry run", TRANSPORT_PUSH_DRY_RUN),
+ OPT_BIT('n' , "dry-run", &flags, "dry run", TRANSPORT_PUSH_DRY_RUN),
OPT_BIT( 0, "porcelain", &flags, "machine-readable output", TRANSPORT_PUSH_PORCELAIN),
OPT_BIT('f', "force", &flags, "force updates", TRANSPORT_PUSH_FORCE),
OPT_BOOLEAN( 0 , "thin", &thin, "use thin pack"),