author | Michael J Gruber <git@drmicha.warpmail.net> | |
Fri, 1 Apr 2011 09:20:31 +0000 (11:20 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 1 Apr 2011 21:42:25 +0000 (14:42 -0700) | ||
commit | ef803fd4b09bca707c7c27669a2789bb050b488c | |
tree | cad535fbfa0afd570bbbc75efac196bcc5e3afb7 | tree | snapshot |
parent | 2352570bf43368f3d3931f7b24bb7fd44e68eef3 | commit | diff |
builtin/log.c: separate default and setup of cmd_log_init()
cmd_log_init() sets up some default rev options and then calls
setup_revisions(), so that a caller cannot set up own defaults: Either
they get overriden by cmd_log_init() (if set before) or they override
the command line (if set after). We even complain about this in a
comment to cmd_log_reflog().
Therefore, separate the two steps so that one can still call
cmd_log_init() or, alternatively, cmd_log_init_defaults() followed by
cmd_log_init_finish() (and set defaults in between).
No functional change so far.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cmd_log_init() sets up some default rev options and then calls
setup_revisions(), so that a caller cannot set up own defaults: Either
they get overriden by cmd_log_init() (if set before) or they override
the command line (if set after). We even complain about this in a
comment to cmd_log_reflog().
Therefore, separate the two steps so that one can still call
cmd_log_init() or, alternatively, cmd_log_init_defaults() followed by
cmd_log_init_finish() (and set defaults in between).
No functional change so far.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/log.c | diff | blob | history |