Commits

Greg Ward  committed 89b3565

hg: don't ask "hg status" for unknown files unless the user wants it

  • Participants
  • Parent commits f37745d

Comments (0)

Files changed (1)

     char *argv[] = {"hg", "--quiet", "status",
                     "--modified", "--added", "--removed",
                     "--unknown", NULL};
+    if (!context->options->show_unknown) {
+        // asking hg to search for unknown files can be expensive, so
+        // skip it unless the user wants it
+        argv[6] = NULL;
+    }
     capture_t *capture = capture_child("hg", argv);
     if (capture == NULL) {
         debug("unable to execute 'hg status'");