diff options
author | Michael J Gruber <git@drmicha.warpmail.net> | 2011-04-01 11:20:33 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-04-01 14:42:31 -0700 |
commit | 4b56cf58a9ee684d47e01d815eccd75252d61da5 (patch) | |
tree | b1906e020252b7f249b0e8bb9ff9fc091058a531 /builtin | |
parent | 21d2616a7181472ae43e33d762a2733827cff9e9 (diff) | |
download | git-4b56cf58a9ee684d47e01d815eccd75252d61da5.tar.gz git-4b56cf58a9ee684d47e01d815eccd75252d61da5.tar.xz |
reflog: fix overriding of command line options
Currently, "git reflog" overrides some command line options such as
"--format".
Fix this by using the new 2-phase version of cmd_log_init().
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/log.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/builtin/log.c b/builtin/log.c index 59fe58855..9cb5b70d1 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -489,16 +489,11 @@ int cmd_log_reflog(int argc, const char **argv, const char *prefix) rev.verbose_header = 1; memset(&opt, 0, sizeof(opt)); opt.def = "HEAD"; - cmd_log_init(argc, argv, prefix, &rev, &opt); - - /* - * This means that we override whatever commit format the user gave - * on the cmd line. Sad, but cmd_log_init() currently doesn't - * allow us to set a different default. - */ + cmd_log_init_defaults(&rev); rev.commit_format = CMIT_FMT_ONELINE; rev.use_terminator = 1; rev.always_show_header = 1; + cmd_log_init_finish(argc, argv, prefix, &rev, &opt); return cmd_log_walk(&rev); } |