Commits

Greg Ward committed 8aa4445

fossil: cosmetic/style tweaks

Comments (0)

Files changed (1)

     // enough to cover all the usual fields (note that 'comment:' can be
     // several lines long) plus eventual output indicating changes in
     // the repo.
-    char *args[] = {"fossil", "status", NULL};
-    capture_t *capture = capture_child("fossil", args);
+    char *argv[] = {"fossil", "status", NULL};
+    capture_t *capture = capture_child("fossil", argv);
     if (capture == NULL) {
         debug("unable to execute 'fossil status'");
         return NULL;
     if (context->options->show_modified) {
         // This can be also done by checking if 'fossil changes'
         // prints anything, but we save a child process this way.
-        if ( strstr(cstdout, "\nEDITED") || strstr(cstdout, "\nADDED")
-            || strstr(cstdout, "\nDELETED") || strstr(cstdout, "\nMISSING")
-            || strstr(cstdout, "\nRENAMED") || strstr(cstdout, "\nNOT_A_FILE")
-            || strstr(cstdout, "\nUPDATED") || strstr(cstdout, "\nMERGED") )
-            result->modified = 1;
+        result->modified = (strstr(cstdout, "\nEDITED") ||
+                            strstr(cstdout, "\nADDED") ||
+                            strstr(cstdout, "\nDELETED") ||
+                            strstr(cstdout, "\nMISSING") ||
+                            strstr(cstdout, "\nRENAMED") ||
+                            strstr(cstdout, "\nNOT_A_FILE") ||
+                            strstr(cstdout, "\nUPDATED") ||
+                            strstr(cstdout, "\nMERGED"));
     }
     if (context->options->show_unknown) {
         // This can't be read from 'fossil status' output
-        args[1] = "extra";
-        capture = capture_child("fossil", args);
+        char *argv[] = {"fossil", "extra", NULL};
+        capture = capture_child("fossil", argv);
         if (capture == NULL) {
             debug("unable to execute 'fossil extra'");
             return NULL;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.