Thread (25 messages) flat view 25 messages, 5 authors, 2016-06-15

Re: [PATCH v4 3/3] config: add '--show-origin' option to print the origin of a config value

From: Jeff King <hidden>
Date: 2016-06-15 23:08:14

On Mon, Feb 15, 2016 at 03:58:12PM -0500, Eric Sunshine wrote:
quoted
diff --git a/builtin/config.c b/builtin/config.c
@@ -27,6 +28,7 @@ static int actions, types;
 static const char *get_color_slot, *get_colorbool_slot;
 static int end_null;
Not related to your changes, but I just realized that this variable
really ought to be named 'end_nul' since we're talking about the
character NUL, not a NULL pointer.
Yeah, I noticed that, too. We just went through a round of related fixes
here, and the "usual" name is now "nul_term_line". I don't especially
like that one either, but at least it is correct and consistent. :)
quoted
 static int respect_includes = -1;
+static int show_origin;
@@ -81,6 +83,7 @@ static struct option builtin_config_options[] = {
        OPT_BOOL('z', "null", &end_null, N_("terminate values with NUL byte")),
Likewise, the long option name should be --nul rather than --null, or
the long name could be dropped altogether since some other commands
just recognize short option -z.

There is no need for this patch series to address this anomaly; it's
perhaps low-hanging fruit for someone wanting to join the project. The
only very minor wrinkle is that we'd still need to recognize --null as
a deprecated (and undocumented) alias for --nul.
I think that would be OK as long as we keep the compatible option.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help