test-tool: handle the `-C <directory>` option just like `git`
[gitweb.git] / t / helper / test-dump-fsmonitor.c
index 08e3684aff223670fb0786d80426d18bb8800a44..2786f47088e975608c839f193527e1e70e84cee9 100644 (file)
@@ -3,11 +3,11 @@
 
 int cmd__dump_fsmonitor(int ac, const char **av)
 {
-       struct index_state *istate = &the_index;
+       struct index_state *istate = the_repository->index;
        int i;
 
        setup_git_directory();
-       if (do_read_index(istate, get_index_file(), 0) < 0)
+       if (do_read_index(istate, the_repository->index_file, 0) < 0)
                die("unable to read index file");
        if (!istate->fsmonitor_last_update) {
                printf("no fsmonitor\n");