Merge branch 'bc/maint-status-z-to-use-porcelain'
authorJunio C Hamano <gitster@pobox.com>
Mon, 6 Jun 2011 18:40:08 +0000 (11:40 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Jun 2011 18:40:08 +0000 (11:40 -0700)
* bc/maint-status-z-to-use-porcelain:
  builtin/commit.c: set status_format _after_ option parsing
  t7508: demonstrate status's failure to use --porcelain format with -z

Conflicts:
builtin/commit.c

1  2 
builtin/commit.c
t/t7508-status.sh

index 5286432f39b87e03a08cc86bb622b6ca3b911365,9e7208f729d9bb8405fd1a6bbbe8f5081db0c497..e1af9b19f0be71484ae9341762dc2bf89cabb70c
@@@ -1204,22 -1039,17 +1204,23 @@@ int cmd_status(int argc, const char **a
                OPT_END(),
        };
  
-       if (null_termination && status_format == STATUS_FORMAT_LONG)
-               status_format = STATUS_FORMAT_PORCELAIN;
 +      if (argc == 2 && !strcmp(argv[1], "-h"))
 +              usage_with_options(builtin_status_usage, builtin_status_options);
 +
        wt_status_prepare(&s);
 +      gitmodules_config();
        git_config(git_status_config, &s);
 +      determine_whence(&s);
        argc = parse_options(argc, argv, prefix,
                             builtin_status_options,
                             builtin_status_usage, 0);
+       if (null_termination && status_format == STATUS_FORMAT_LONG)
+               status_format = STATUS_FORMAT_PORCELAIN;
        handle_untracked_files_arg(&s);
 -
 +      if (show_ignored_in_status)
 +              s.show_ignored_files = 1;
        if (*argv)
                s.pathspec = get_pathspec(prefix, argv);
  
Simple merge