threads / patch / 29227

patchbuiltin/log: remove redundant initialization

Subject: [PATCH] builtin/log: remove redundant initialization

## tl;dr

2 messages between Dec 21, 2011 and Dec 21, 2011. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Michael Schubert· Dec 21, 2011, 12:05 UTC · lore

"abbrev" and "commit_format" in struct rev_info get initialized in init_revisions - no need to reinit in cmd_log_init_defaults.

Signed-off-by: Michael Schubert <mschub@elegosoft.com>
---
 builtin/log.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
Show changes to builtin/log.c +0 −2
diff --git a/builtin/log.c b/builtin/log.c
index 89d0cc0..7d1f6f8 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -73,8 +73,6 @@ static int decorate_callback(const struct option *opt, const char *arg, int unse
 
 static void cmd_log_init_defaults(struct rev_info *rev)
 {
-	rev->abbrev = DEFAULT_ABBREV;
-	rev->commit_format = CMIT_FMT_DEFAULT;
 	if (fmt_pretty)
 		get_commit_format(fmt_pretty, rev);
 	rev->verbose_header = 1;
-- 
1.7.8.400.g03f4

← back to recent threads