{"thread":{"id":"14901","subject":"[PATCH] git-am: ignore --binary option","startedAt":"2008-08-08T23:28:54Z","lastAt":"2008-08-16T02:27:12Z","messageCount":2,"participants":["Stephan Beyer"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"86558","messageId":"1218238134-14231-1-git-send-email-s-beyer@gmx.net","threadId":"14901","inReplyTo":null,"subject":"[PATCH] git-am: ignore --binary option","fromName":"Stephan Beyer","fromEmail":"s-beyer@gmx.net","sentAt":"2008-08-08T23:28:54Z","receivedAt":"2008-08-08T23:28:54Z","isPatch":true,"sender":{"key":"s-beyer@gmx.net","avatar":"https://avatars.githubusercontent.com/u/143889?v=4"},"body":"The git-apply documentation says that --binary is a historical option.\nThis patch lets git-am ignore --binary and removes advertisements of this\noption.\n\nSigned-off-by: Stephan Beyer <s-beyer@gmx.net>\n---\n git-am.sh                |   19 +++++++------------\n t/t0023-crlf-am.sh       |    2 +-\n Documentation/git-am.txt |    7 +------\n 3 files changed, 9 insertions(+), 19 deletions(-)\n\ndiff --git a/git-am.sh b/git-am.sh\nindex 8f91a97..aa60261 100755\n--- a/git-am.sh\n+++ b/git-am.sh\n@@ -10,7 +10,7 @@ git am [options] (--resolved | --skip | --abort)\n --\n d,dotest=       (removed -- do not use)\n i,interactive   run interactively\n-b,binary        pass --allow-binary-replacement to git-apply\n+b,binary        (historical option -- no-op)\n 3,3way          allow fall back on 3way merging if needed\n s,signoff       add a Signed-off-by line to the commit message\n u,utf8          recode into utf8 (default)\n@@ -87,7 +87,7 @@ fall_back_3way () {\n \n     echo Using index info to reconstruct a base tree...\n     if GIT_INDEX_FILE=\"$dotest/patch-merge-tmp-index\" \\\n-\tgit apply $binary --cached <\"$dotest/patch\"\n+\tgit apply --cached <\"$dotest/patch\"\n     then\n \tmv \"$dotest/patch-merge-base+\" \"$dotest/patch-merge-base\"\n \tmv \"$dotest/patch-merge-tmp-index\" \"$dotest/patch-merge-index\"\n@@ -121,7 +121,7 @@ It does not apply to blobs recorded in its index.\"\n \n prec=4\n dotest=\"$GIT_DIR/rebase-apply\"\n-sign= utf8=t keep= skip= interactive= resolved= binary= rebasing= abort=\n+sign= utf8=t keep= skip= interactive= resolved= rebasing= abort=\n resolvemsg= resume=\n git_apply_opt=\n \n@@ -131,7 +131,7 @@ do\n \t-i|--interactive)\n \t\tinteractive=t ;;\n \t-b|--binary)\n-\t\tbinary=t ;;\n+\t\t: ;;\n \t-3|--3way)\n \t\tthreeway=t ;;\n \t-s|--signoff)\n@@ -149,7 +149,7 @@ do\n \t--abort)\n \t\tabort=t ;;\n \t--rebasing)\n-\t\trebasing=t threeway=t keep=t binary=t ;;\n+\t\trebasing=t threeway=t keep=t ;;\n \t-d|--dotest)\n \t\tdie \"-d option is no longer supported.  Do not use.\"\n \t\t;;\n@@ -247,10 +247,9 @@ else\n \t\texit 1\n \t}\n \n-\t# -b, -s, -u, -k and --whitespace flags are kept for the\n+\t# -s, -u, -k and --whitespace flags are kept for the\n \t# resuming session after a patch failure.\n \t# -3 and -i can and must be given when resuming.\n-\techo \"$binary\" >\"$dotest/binary\"\n \techo \" $ws\" >\"$dotest/whitespace\"\n \techo \"$sign\" >\"$dotest/sign\"\n \techo \"$utf8\" >\"$dotest/utf8\"\n@@ -274,10 +273,6 @@ case \"$resolved\" in\n \tfi\n esac\n \n-if test \"$(cat \"$dotest/binary\")\" = t\n-then\n-\tbinary=--allow-binary-replacement\n-fi\n if test \"$(cat \"$dotest/utf8\")\" = t\n then\n \tutf8=-u\n@@ -459,7 +454,7 @@ do\n \n \tcase \"$resolved\" in\n \t'')\n-\t\tgit apply $git_apply_opt $binary --index \"$dotest/patch\"\n+\t\tgit apply $git_apply_opt --index \"$dotest/patch\"\n \t\tapply_status=$?\n \t\t;;\n \tt)\ndiff --git a/Documentation/git-am.txt b/Documentation/git-am.txt\nindex c45c53e..b9c6fac 100644\n--- a/Documentation/git-am.txt\n+++ b/Documentation/git-am.txt\n@@ -10,7 +10,7 @@ SYNOPSIS\n --------\n [verse]\n 'git am' [--signoff] [--keep] [--utf8 | --no-utf8]\n-         [--3way] [--interactive] [--binary]\n+\t [--3way] [--interactive]\n          [--whitespace=<option>] [-C<n>] [-p<n>]\n \t [<mbox> | <Maildir>...]\n 'git am' (--skip | --resolved | --abort)\n@@ -59,11 +59,6 @@ default.   You could use `--no-utf8` to override this.\n \tit is supposed to apply to, and we have those blobs\n \tavailable locally.\n \n--b::\n---binary::\n-\tPass `--allow-binary-replacement` flag to 'git-apply'\n-\t(see linkgit:git-apply[1]).\n-\n --whitespace=<option>::\n \tThis flag is passed to the 'git-apply' (see linkgit:git-apply[1])\n \tprogram that applies\ndiff --git a/t/t0023-crlf-am.sh b/t/t0023-crlf-am.sh\nindex 6f8a434..aaed725 100755\n--- a/t/t0023-crlf-am.sh\n+++ b/t/t0023-crlf-am.sh\n@@ -36,7 +36,7 @@ test_expect_success 'setup' '\n \n test_expect_success 'am' '\n \n-\tgit am --binary -3 <patchfile &&\n+\tgit am -3 <patchfile &&\n \tgit diff-files --name-status --exit-code\n \n '\n-- \n1.6.0.rc0.49.gd39f\n"},{"id":"87360","messageId":"20080816022712.GD8837@leksak.fem-net","threadId":"14901","inReplyTo":"1218238134-14231-1-git-send-email-s-beyer@gmx.net","subject":"Re: [PATCH] git-am: ignore --binary option","fromName":"Stephan Beyer","fromEmail":"s-beyer@gmx.net","sentAt":"2008-08-16T02:27:12Z","receivedAt":"2008-08-16T02:27:12Z","isPatch":true,"sender":{"key":"s-beyer@gmx.net","avatar":"https://avatars.githubusercontent.com/u/143889?v=4"},"body":"Hi,\n\nStephan Beyer wrote:\n> The git-apply documentation says that --binary is a historical option.\n> This patch lets git-am ignore --binary and removes advertisements of this\n> option.\n\nI thought 1.6.0 would be the right release to not advertise the --binary\noption any longer, but it seems that this is wrong.\n\nIs there some reason that this patch is going into a wrong direction?\nOr was it just overlooked?\n\nKind regards,\n  Stephan\n\n-- \nStephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F\n"}]}