diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-10-20 12:23:48 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-10-20 12:23:48 -0700 |
commit | b94657683996402228abb1694a5db4792c424f9e (patch) | |
tree | a553b8703be639bf1af8c74946337a5ebe08529f /log-tree.c | |
parent | b67588d018441d1485378a7d9b460401ba8b76a5 (diff) | |
parent | f6c5a2968c103621adf6928a29e4895361eaa23b (diff) | |
download | git-b94657683996402228abb1694a5db4792c424f9e.tar.gz |
Merge branch 'jn/parse-config-slot'
Code cleanup.
* jn/parse-config-slot:
color_parse: do not mention variable name in error message
pass config slots as pointers instead of offsets
Diffstat (limited to 'log-tree.c')
-rw-r--r-- | log-tree.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/log-tree.c b/log-tree.c index cff7ac1dbd..7f0890e4ac 100644 --- a/log-tree.c +++ b/log-tree.c @@ -56,15 +56,14 @@ static int parse_decorate_color_slot(const char *slot) return -1; } -int parse_decorate_color_config(const char *var, const int ofs, const char *value) +int parse_decorate_color_config(const char *var, const char *slot_name, const char *value) { - int slot = parse_decorate_color_slot(var + ofs); + int slot = parse_decorate_color_slot(slot_name); if (slot < 0) return 0; if (!value) return config_error_nonbool(var); - color_parse(value, var, decoration_colors[slot]); - return 0; + return color_parse(value, decoration_colors[slot]); } /* |