Thread (1 message) 1 message, 1 author, 2019-02-11

Re: [PATCH] completion: add more parameter value completion

From: Junio C Hamano <hidden>
Date: 2019-02-11 18:52:08

Nguyễn Thái Ngọc Duy  [off-list ref] writes:

Nguyễn Thái Ngọc Duy  [off-list ref] writes:
This adds value completion for a couple more paramters. To make it
easier to maintain these hard coded lists, add a comment at the original
list/code to remind people to update git-completion.bash too.

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
 This 6 month old patch was part of the attempt to automate value
 completion. That might never come, but at least this is still good.
Perhaps this is not yet good without proofreading.
quoted hunk
diff --git a/builtin/help.c b/builtin/help.c
index 7739a5c155..eef8b7c802 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -70,6 +70,10 @@ static enum help_format parse_help_format(const char *format)
 		return HELP_FORMAT_INFO;
 	if (!strcmp(format, "web") || !strcmp(format, "html"))
 		return HELP_FORMAT_WEB;
+	/*
+	 * Please update _git_config() in git-completion.bash when you
+	 * add new rebase modes.
+	 */
Huh?  s/rebase modes/help formats/, I guess.
 	die(_("unrecognized help format '%s'"), format);
 }
quoted hunk
diff --git a/builtin/replace.c b/builtin/replace.c
index affcdfb416..1c312725d1 100644
--- a/builtin/replace.c
+++ b/builtin/replace.c
@@ -82,6 +82,10 @@ static int list_replace_refs(const char *pattern, const char *format)
 		data.format = REPLACE_FORMAT_MEDIUM;
 	else if (!strcmp(format, "long"))
 		data.format = REPLACE_FORMAT_LONG;
+	/*
+	 * Please update _git_replace() in git-completion.bash when
+	 * you add ne format
s/ne/&w/;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help