{"thread":{"id":"20933","subject":"[PATCH v2] git-push: Accept -n as a synonym for --dry-run.","startedAt":"2009-09-13T16:56:45Z","lastAt":"2009-09-13T16:56:45Z","messageCount":1,"participants":["Nelson Elhage"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"123068","messageId":"1252861005-20220-1-git-send-email-nelhage@mit.edu","threadId":"20933","inReplyTo":null,"subject":"[PATCH v2] git-push: Accept -n as a synonym for --dry-run.","fromName":"Nelson Elhage","fromEmail":"nelhage@mit.edu","sentAt":"2009-09-13T16:56:45Z","receivedAt":"2009-09-13T16:56:45Z","isPatch":true,"sender":{"key":"nelhage@mit.edu","avatar":"https://avatars.githubusercontent.com/u/16725?v=4"},"body":"git-push is not currently using -n for anything else, and it seems\nunlikely we will want to use it to mean anything else in the future,\nso add it as an alias for convenience.\n\nSigned-off-by: Nelson Elhage <nelhage@mit.edu>\n---\n\n Documentation/git-push.txt |    3 ++-\n builtin-push.c             |    4 ++--\n 2 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-push.txt b/Documentation/git-push.txt\nindex 58d2bd5..ba6a8a2 100644\n--- a/Documentation/git-push.txt\n+++ b/Documentation/git-push.txt\n@@ -9,7 +9,7 @@ git-push - Update remote refs along with associated objects\n SYNOPSIS\n --------\n [verse]\n-'git push' [--all | --mirror | --tags] [--dry-run] [--receive-pack=<git-receive-pack>]\n+'git push' [--all | --mirror | --tags] [-n | --dry-run] [--receive-pack=<git-receive-pack>]\n \t   [--repo=<repository>] [-f | --force] [-v | --verbose]\n \t   [<repository> <refspec>...]\n \n@@ -82,6 +82,7 @@ nor in any Push line of the corresponding remotes file---see below).\n \tif the configuration option `remote.<remote>.mirror` is\n \tset.\n \n+-n::\n --dry-run::\n \tDo everything except actually send the updates.\n \ndiff --git a/builtin-push.c b/builtin-push.c\nindex 787011f..5e5f3ad 100644\n--- a/builtin-push.c\n+++ b/builtin-push.c\n@@ -10,7 +10,7 @@\n #include \"parse-options.h\"\n \n static const char * const push_usage[] = {\n-\t\"git push [--all | --mirror] [--dry-run] [--porcelain] [--tags] [--receive-pack=<git-receive-pack>] [--repo=<repository>] [-f | --force] [-v] [<repository> <refspec>...]\",\n+\t\"git push [--all | --mirror] [-n | --dry-run] [--porcelain] [--tags] [--receive-pack=<git-receive-pack>] [--repo=<repository>] [-f | --force] [-v] [<repository> <refspec>...]\",\n \tNULL,\n };\n \n@@ -182,7 +182,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)\n \t\tOPT_BIT( 0 , \"mirror\", &flags, \"mirror all refs\",\n \t\t\t    (TRANSPORT_PUSH_MIRROR|TRANSPORT_PUSH_FORCE)),\n \t\tOPT_BOOLEAN( 0 , \"tags\", &tags, \"push tags\"),\n-\t\tOPT_BIT( 0 , \"dry-run\", &flags, \"dry run\", TRANSPORT_PUSH_DRY_RUN),\n+\t\tOPT_BIT('n' , \"dry-run\", &flags, \"dry run\", TRANSPORT_PUSH_DRY_RUN),\n \t\tOPT_BIT( 0,  \"porcelain\", &flags, \"machine-readable output\", TRANSPORT_PUSH_PORCELAIN),\n \t\tOPT_BIT('f', \"force\", &flags, \"force updates\", TRANSPORT_PUSH_FORCE),\n \t\tOPT_BOOLEAN( 0 , \"thin\", &thin, \"use thin pack\"),\n-- \n1.6.3.1.499.ge7b8da\n"}]}