On Tue, May 29, 2018 at 12:31:53AM +0900, Junio C Hamano wrote: > Jeff King <peff@xxxxxxxx> writes: > > > diff --git a/show-index.c b/builtin/show-index.c > > similarity index 96% > > rename from show-index.c > > rename to builtin/show-index.c > > index 1ead41e211..65fa86dd08 100644 > > --- a/show-index.c > > +++ b/builtin/show-index.c > > @@ -4,7 +4,7 @@ > > I squashed > > #include "builtin.h" > > near the beginning of this file to squelch -DDEVELOPER extra > warnings. Otherwise looks obviously good. Thanks. I'm still using my custom build options, and obviously I need to add -Wmissing-prototypes. > > diff --git a/git.c b/git.c > > index 5771d62a32..c91e144d9a 100644 > > --- a/git.c > > +++ b/git.c > > @@ -470,6 +470,7 @@ static struct cmd_struct commands[] = { > > { "shortlog", cmd_shortlog, RUN_SETUP_GENTLY | USE_PAGER }, > > { "show", cmd_show, RUN_SETUP }, > > { "show-branch", cmd_show_branch, RUN_SETUP }, > > + { "show-index", cmd_show_index }, > > Hmph, this does not need SETUP? Ah, of course, because its > subcommand body used to do everything itself, and this patch just > turns cmd_main() to cmd_show_index(). It is not even that it does the setup itself. It does not need the setup at all, because it is purely a mechanical parsing of the stdin stream to text output. No repo required, and it does not know or care if the matching packfile even exists. -Peff