add replay and log to the usage string of git-bisect
[gitweb.git] / git.c
diff --git a/git.c b/git.c
index d21e5e505c9622efcfd6eb147a5d4a0528660e0e..82a8357272bee1ad6d452a19bf9270f94d94a6cc 100644 (file)
--- a/git.c
+++ b/git.c
@@ -235,6 +235,8 @@ static void handle_internal_command(int argc, const char **argv, char **envp)
                { "fmt-merge-msg", cmd_fmt_merge_msg, RUN_SETUP },
                { "for-each-ref", cmd_for_each_ref, RUN_SETUP },
                { "format-patch", cmd_format_patch, RUN_SETUP },
+               { "fsck", cmd_fsck, RUN_SETUP },
+               { "fsck-objects", cmd_fsck, RUN_SETUP },
                { "get-tar-commit-id", cmd_get_tar_commit_id },
                { "grep", cmd_grep, RUN_SETUP },
                { "help", cmd_help },
@@ -297,8 +299,9 @@ static void handle_internal_command(int argc, const char **argv, char **envp)
                        prefix = setup_git_directory();
                if (p->option & USE_PAGER)
                        setup_pager();
-               if ((p->option & NOT_BARE) && is_bare_repository())
-                       die("%s cannot be used in a bare git directory", cmd);
+               if ((p->option & NOT_BARE) &&
+                               (is_bare_repository() || is_inside_git_dir()))
+                       die("%s must be run in a work tree", cmd);
                trace_argv_printf(argv, argc, "trace: built-in: git");
 
                exit(p->fn(argc, argv, prefix));