} else if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate")) {
setup_pager();
} else if (!strcmp(cmd, "--git-dir")) {
- if (*argc < 1)
- return -1;
+ if (*argc < 2) {
+ fprintf(stderr, "No directory given for --git-dir.\n" );
+ usage(git_usage_string);
+ }
setenv("GIT_DIR", (*argv)[1], 1);
(*argv)++;
(*argc)--;
{ "read-tree", cmd_read_tree, RUN_SETUP },
{ "reflog", cmd_reflog, RUN_SETUP },
{ "repo-config", cmd_repo_config },
+ { "rerere", cmd_rerere, RUN_SETUP },
{ "rev-list", cmd_rev_list, RUN_SETUP },
{ "rev-parse", cmd_rev_parse, RUN_SETUP },
{ "rm", cmd_rm, RUN_SETUP },