diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-06-01 13:38:16 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-05 11:39:59 +0900 |
commit | 5a88f97cff0f269f8b2069b17c9da05ee66c98bb (patch) | |
tree | c7cb309f1167013a5d292be28c6d5db72b0bbb66 /preload-index.c | |
parent | submodule--helper: show usage for "-h" (diff) | |
download | tgif-5a88f97cff0f269f8b2069b17c9da05ee66c98bb.tar.xz |
diff- and log- family: handle "git cmd -h" early
"git $builtin -h" bypasses the usual repository setup and calls the
cmd_$builtin() function, expecting it to show the help text.
Unfortunately the commands in the log- and the diff- family want to
call into the revisions machinery, which by definition needs to have
a repository already discovered. Strictly speaking, they may not
need a repository only for parsing "-h", but it is a good discipline
to future-proof codepath to ensure that setup_revisions() is called
after we know that a repository is there.
Handle the "git $builtin -h" special case very early in these
commands to work around potential issues.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'preload-index.c')
0 files changed, 0 insertions, 0 deletions