Re: [PATCH/RFC] setup: update error message to be more meaningful
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 26, 2017, 20:09 UTC
- Message-ID
- <xmqqlgnbq7sc.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20170725212110.GG13924@aiede.mtv.corp.google.com>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 9 quoted lines
> For an initial guess: in the example > > git grep test -n > > ... > 2. Focus on "argument" instead of "filename" so that the message > could still apply: something like > > fatal: option '-n' must come before non-option arguments
I think this one is the most sensible. There may or may not be a file called "test" in the working tree, and the user may or may not meant to look for a pattern "test". What is wrong in the sample command line is that "test" is not a dashed option and yet it has a dashed option "-n" after it, and your version clearly explains it.