# [PATCH] builtin/log: remove redundant initialization

2 messages from 2011-12-21 to 2011-12-21. Participants: Michael Schubert, Junio C Hamano.
Thread: https://gitlist.dev/t/29227

## Michael Schubert, 2011-12-21 12:05

Subject: [PATCH] builtin/log: remove redundant initialization
Message-ID: <4EF1CB87.8050801@elegosoft.com>
URL: https://gitlist.dev/e/4EF1CB87.8050801%40elegosoft.com

```
"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(-)

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

```

## Junio C Hamano, 2011-12-21 19:16

Subject: Re: [PATCH] builtin/log: remove redundant initialization
Message-ID: <7vaa6lhh1o.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vaa6lhh1o.fsf%40alter.siamese.dyndns.org
In-Reply-To: <4EF1CB87.8050801@elegosoft.com>

```
Thanks.

```
