{"thread":{"id":"1229","subject":"[PATCH] apply: match documentation, usage string and code.","startedAt":"2005-07-14T03:28:55Z","lastAt":"2005-07-14T03:28:55Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"6110","messageId":"7vy88ajcaw.fsf@assigned-by-dhcp.cox.net","threadId":"1229","inReplyTo":null,"subject":"[PATCH] apply: match documentation, usage string and code.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-07-14T03:28:55Z","receivedAt":"2005-07-14T03:28:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The more recent --apply option was not described.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n Documentation/git-apply.txt |   28 ++++++++++++++++------------\n apply.c                     |    4 +++-\n 2 files changed, 19 insertions(+), 13 deletions(-)\n\nace792c165ec274a18cedbdc78affea4d87d6c76\ndiff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt\n--- a/Documentation/git-apply.txt\n+++ b/Documentation/git-apply.txt\n@@ -9,8 +9,7 @@ git-apply - Apply patch on a GIT index f\n \n SYNOPSIS\n --------\n-'git-apply' [--no-merge] [--stat] [--summary] [--check]\n-[--index] [--show-files] [-] [<file>...]\n+'git-apply' [--no-merge] [--stat] [--summary] [--check] [--index] [--show-files] [--apply] [<patch>...]\n \n DESCRIPTION\n -----------\n@@ -19,31 +18,29 @@ and a work tree.\n \n OPTIONS\n -------\n-<file>...::\n-\tThe files to read patch from.\n-\n--::\n-\tInstead of reading from a file, read from standard input.\n+<patch>...::\n+\tThe files to read patch from.  '-' can be used to read\n+\tfrom the standard input.\n \n --no-merge::\n \tThe default mode of operation is the merge behaviour\n-\twhich is not quite implemented yet.  This flag\n-\texplicitly tells the program not to use the merge\n-\tbehaviour.\n+\twhich is not implemented yet.  This flag explicitly\n+\ttells the program not to use the merge behaviour.\n \n --stat::\n \tInstead of applying the patch, output diffstat for the\n-\tinput.\n+\tinput.  Turns off \"apply\".\n \n --summary::\n \tInstead of applying the patch, output a condensed\n \tsummary of information obtained from git diff extended\n \theaders, such as creations, renames and mode changes.\n+\tTurns off \"apply\".\n \n --check::\n \tInstead of applying the patch, see if the patch is\n \tapplicable to the current work tree and/or the index\n-\tfile and detects errors.\n+\tfile and detects errors.  Turns off \"apply\".\n \n --index::\n \tWhen --check is in effect, or when applying the patch\n@@ -57,6 +54,13 @@ OPTIONS\n --show-files::\n \tShow summary of files that are affected by the patch.\n \n+--apply::\n+\tIf you use any of the options marked ``Turns off\n+\t\"apply\"'' above, git-apply reads and outputs the\n+\tinformation you asked without actually applying the\n+\tpatch.  Give this flag after those flags to also apply\n+\tthe patch.\n+\n \n Author\n ------\ndiff --git a/apply.c b/apply.c\n--- a/apply.c\n+++ b/apply.c\n@@ -32,7 +32,8 @@ static int summary = 0;\n static int check = 0;\n static int apply = 1;\n static int show_files = 0;\n-static const char apply_usage[] = \"git-apply [--stat] [--summary] [--check] [--show-files] <patch>\";\n+static const char apply_usage[] =\n+\"git-apply [--no-merge] [--stat] [--summary] [--check] [--index] [--apply] [--show-files] <patch>...\";\n \n /*\n  * For \"diff-stat\" like behaviour, we keep track of the biggest change\n@@ -1424,6 +1425,7 @@ int main(int argc, char **argv)\n \t\t\tread_stdin = 0;\n \t\t\tcontinue;\n \t\t}\n+\t\t/* NEEDSWORK: this does not do anything at this moment. */\n \t\tif (!strcmp(arg, \"--no-merge\")) {\n \t\t\tmerge_patch = 0;\n \t\t\tcontinue;\n"}]}