git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 6/6] parse_decoration_style: drop unused argument `var`

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
Aug 7, 2017, 18:20 UTC
Message-ID
<efb46bffdac9dcf1fa91ee5a800ce370ceadfd55.1502128418.git.martin.agren@gmail.com>
In-Reply-To
<cover.1502128418.git.martin.agren@gmail.com>
The previous commit left it unused.
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
---
 builtin/log.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/builtin/log.c b/builtin/log.c
index 9182f0ee3..483d15a94 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -58,7 +58,7 @@ static int auto_decoration_style(void)
 	return (isatty(1) || pager_in_use()) ? DECORATE_SHORT_REFS : 0;
 }
 
-static int parse_decoration_style(const char *var, const char *value)
+static int parse_decoration_style(const char *value)
 {
 	switch (git_parse_maybe_bool(value)) {
 	case 1:
@@ -82,7 +82,7 @@ static int decorate_callback(const struct option *opt, const char *arg, int unse
 	if (unset)
 		decoration_style = 0;
 	else if (arg)
-		decoration_style = parse_decoration_style("command line", arg);
+		decoration_style = parse_decoration_style(arg);
 	else
 		decoration_style = DECORATE_SHORT_REFS;
 
@@ -409,7 +409,7 @@ static int git_log_config(const char *var, const char *value, void *cb)
 	if (!strcmp(var, "log.date"))
 		return git_config_string(&default_date_mode, var, value);
 	if (!strcmp(var, "log.decorate")) {
-		decoration_style = parse_decoration_style(var, value);
+		decoration_style = parse_decoration_style(value);
 		if (decoration_style < 0)
 			decoration_style = 0; /* maybe warn? */
 		return 0;
-- 
2.14.0.5.g0f7b1ed27
Previous: Martin ÅgrenNext: Stefan Beller
Message 8 of 13 in “clean up parsing of maybe_bool”
  1. 0/6 clean up parsing of maybe_boolMartin Ågren, Aug 7, 2017
  2. 1/6 Doc/git-{push,send-pack}: correct --sign= to --signed=Martin Ågren, Aug 7, 2017
  3. 2/6 t5334: document that git push --signed=1 does not workMartin Ågren, Aug 7, 2017
  4. Junio C HamanoAug 7, 2017
  5. 3/6 config: introduce git_parse_maybe_bool_textMartin Ågren, Aug 7, 2017
  6. 4/6 config: make git_{config,parse}_maybe_bool equivalentMartin Ågren, Aug 7, 2017
  7. 5/6 treewide: deprecate git_config_maybe_bool, use git_parse_maybe_boolMartin Ågren, Aug 7, 2017
  8. 6/6 parse_decoration_style: drop unused argument `var`Martin Ågren, Aug 7, 2017
  9. Stefan BellerAug 7, 2017
  10. Junio C HamanoAug 7, 2017
  11. Martin ÅgrenAug 8, 2017
  12. Junio C HamanoAug 8, 2017
  13. Martin ÅgrenAug 8, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.