From: Junio C Hamano Date: Mon, 6 Jun 2011 18:40:08 +0000 (-0700) Subject: Merge branch 'bc/maint-status-z-to-use-porcelain' X-Git-Tag: v1.7.6-rc1~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6c92972d7f5ab247a8cab5e4b88cb281bf201970;p=git.git Merge branch 'bc/maint-status-z-to-use-porcelain' * 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 --- 6c92972d7f5ab247a8cab5e4b88cb281bf201970 diff --cc builtin/commit.c index 5286432f3,9e7208f72..e1af9b19f --- a/builtin/commit.c +++ b/builtin/commit.c @@@ -1204,22 -1039,17 +1204,23 @@@ int cmd_status(int argc, const char **a OPT_END(), }; + if (argc == 2 && !strcmp(argv[1], "-h")) + usage_with_options(builtin_status_usage, builtin_status_options); + - if (null_termination && status_format == STATUS_FORMAT_LONG) - status_format = STATUS_FORMAT_PORCELAIN; - 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);