threads / patch / 18374

patch, 2 partsapply: hide unused options from short help

Subject: [PATCH 2/2] apply: hide unused options from short help

## tl;dr

2 messages between Mar 18, 2009 and Mar 18, 2009. Diffs are folded; open one to read it.

replies: 1people: 1as markdown or json

Michele Ballabio· Mar 18, 2009, 18:05 UTC · lore

[PATCH 1/2] apply: consistent spelling of "don't"

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
---
 builtin-apply.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to builtin-apply.c +1 −1
diff --git a/builtin-apply.c b/builtin-apply.c
index f312798..a664338 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -3212,7 +3212,7 @@ int cmd_apply(int argc, const char **argv, const char *unused_prefix)
 
 	struct option builtin_apply_options[] = {
 		{ OPTION_CALLBACK, 0, "exclude", NULL, "path",
-			"don´t apply changes matching the given path",
+			"don't apply changes matching the given path",
 			0, option_parse_exclude },
 		{ OPTION_CALLBACK, 0, "include", NULL, "path",
 			"apply changes matching the given path",
-- 
1.6.2.22.gc2ac
Michele Ballabio· Mar 18, 2009, 18:05 UTC · re: Michele Ballabio · lore

The options "--binary" and "--allow-binary-replacement" of git-apply are no-op and maintained for backward compatibility, so avoid to show them in the short help screen.

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
---
 builtin-apply.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
Show changes to builtin-apply.c +4 −4
diff --git a/builtin-apply.c b/builtin-apply.c
index a664338..0e8e5ae 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -3224,10 +3224,10 @@ int cmd_apply(int argc, const char **argv, const char *unused_prefix)
 			"ignore additions made by the patch"),
 		OPT_BOOLEAN(0, "stat", &diffstat,
 			"instead of applying the patch, output diffstat for the input"),
-		OPT_BOOLEAN(0, "allow-binary-replacement", &binary,
-			"now no-op"),
-		OPT_BOOLEAN(0, "binary", &binary,
-			"now no-op"),
+		{ OPTION_BOOLEAN, 0, "allow-binary-replacement", &binary,
+		  NULL, "old option, now no-op", PARSE_OPT_HIDDEN },
+		{ OPTION_BOOLEAN, 0, "binary", &binary,
+		  NULL, "old option, now no-op", PARSE_OPT_HIDDEN },
 		OPT_BOOLEAN(0, "numstat", &numstat,
 			"shows number of added and deleted lines in decimal notation"),
 		OPT_BOOLEAN(0, "summary", &summary,
-- 
1.6.2.22.gc2ac

← back to recent threads