status: collect per-file data for --porcelain=v2
[gitweb.git] / builtin / commit.c
index 185ac35d0235f9f458660ee8255e1433e3cfd0e8..3d222d39705134ba6c30463a4c8851b718a9fa6f 100644 (file)
@@ -153,6 +153,8 @@ static int opt_parse_porcelain(const struct option *opt, const char *arg, int un
                *value = STATUS_FORMAT_PORCELAIN;
        else if (!strcmp(arg, "v1") || !strcmp(arg, "1"))
                *value = STATUS_FORMAT_PORCELAIN;
+       else if (!strcmp(arg, "v2") || !strcmp(arg, "2"))
+               *value = STATUS_FORMAT_PORCELAIN_V2;
        else
                die("unsupported porcelain version '%s'", arg);
 
@@ -1104,6 +1106,7 @@ static struct status_deferred_config {
 static void finalize_deferred_config(struct wt_status *s)
 {
        int use_deferred_config = (status_format != STATUS_FORMAT_PORCELAIN &&
+                                  status_format != STATUS_FORMAT_PORCELAIN_V2 &&
                                   !s->null_termination);
 
        if (s->null_termination) {