On Thu, Oct 5, 2017 at 1:54 PM,  <jameson.mille...@gmail.com> wrote:
> From: Jameson Miller <jam...@microsoft.com>
>
> It is not clear what the correct behavior should be when you ask for
> specific ignored behavior without reporting untracked files. For now,
> report this as an unsupported combination of input arguments, so it
> can be modified in the future without back compat concerns.

Is there a rationale to put this as an extra commit at the end,
or could this be squashed into the first commit as well?

>
> Signed-off-by: Jameson Miller <jam...@microsoft.com>
> ---
>  builtin/commit.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/builtin/commit.c b/builtin/commit.c
> index 34443b45d3..7812e106ad 100644
> --- a/builtin/commit.c
> +++ b/builtin/commit.c
> @@ -1400,6 +1400,11 @@ int cmd_status(int argc, const char **argv, const char 
> *prefix)
>         handle_untracked_files_arg(&s);
>         handle_ignored_arg(&s);
>
> +       /* Check for unsupported combination of args */

Oh, this is the first check that we add here for unsupported combinations.
How much value does this comment bring to the future reader?

> +       if (s.show_ignored_mode == SHOW_MATCHING_IGNORED &&
> +           s.show_untracked_files == SHOW_NO_UNTRACKED_FILES)
> +               die(_("Unsupported combination of ignored and untracked-files 
> arguments"));

Thanks for taking care of the corner case!
Stefan

Reply via email to